Empty commit to start new workflow run #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and deploy | |
on: | |
push: | |
branches: ['master'] | |
tags: ['v*'] | |
jobs: | |
build-server: | |
name: Build server image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
# Defines tags and labels for the Docker image based on git metadata. | |
# This will tag 'latest' and e.g. 'v37.1' when a tag v37.1 is pushed, | |
# and 'master' when something is pushed to master. | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/vincevd1/thaliany-server | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
file: ./infra/server/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha,scope=${{ github.ref }}-server | |
cache-to: type=gha,mode=max,scope=${{ github.ref }}-server | |
build-nginx: | |
name: Build nginx image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
# Defines tags and labels for the Docker image based on git metadata. | |
# This will tag 'latest' and e.g. 'v37.1' when a tag v37.1 is pushed, | |
# and 'master' when something is pushed to master. | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/vincevd1/thaliany-nginx | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
file: ./infra/nginx/Dockerfile | |
push: true | |
build-args: | | |
ARG VITE_CLIENT_ID=${{ secrets.CONCREXIT_CLIENT_ID }} | |
ARG VITE_CONCREXIT_URI=https://thalia.nu | |
ARG VITE_REDIRECT_URI=https://any.thalia.nu/auth/callback | |
ARG VITE_BACKEND_URI=https://any.thalia.nu | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha,scope=${{ github.ref }}-thaliany-nginx | |
cache-to: type=gha,mode=max,scope=${{ github.ref }}-thaliany-nginx |