2024-05-10 23:00:50 +00:00
|
|
|
name: Docker Build & Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build Docker
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code 🛎️
|
|
|
|
uses: actions/checkout@v4
|
2024-05-12 05:29:02 +00:00
|
|
|
- name: Set up node 20
|
2024-05-12 05:27:11 +00:00
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 20
|
2024-05-10 23:00:50 +00:00
|
|
|
- name: Set up Docker Buildx 🚀
|
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-05-17 22:10:24 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
version: latest
|
2024-05-10 23:00:50 +00:00
|
|
|
|
2024-05-10 23:28:00 +00:00
|
|
|
- name: Login to rannes.dev registry 🚢
|
2024-05-10 23:00:50 +00:00
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
2024-05-10 23:11:41 +00:00
|
|
|
registry: gitea.rannes.dev
|
2024-05-17 22:10:24 +00:00
|
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.RANNES_REGISTRY }}
|
2024-05-17 22:47:57 +00:00
|
|
|
- name: Make envfile
|
|
|
|
uses: SpicyPizza/create-envfile@v2.0
|
|
|
|
with:
|
2024-05-17 22:50:29 +00:00
|
|
|
envkey_PLACES_API: ${{ secrets.PLACES_API }}
|
2024-05-17 22:47:57 +00:00
|
|
|
directory: .
|
|
|
|
file_name: .env.production
|
|
|
|
fail_on_empty: false
|
|
|
|
sort_keys: false
|
2024-05-10 23:00:50 +00:00
|
|
|
|
|
|
|
- name: Build and push 🏗️
|
2024-05-17 22:16:17 +00:00
|
|
|
uses: docker/build-push-action@v5
|
2024-05-10 23:00:50 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2024-05-17 22:10:24 +00:00
|
|
|
tags: gitea.rannes.dev/rannes.dev/local-weather:latest
|