Update backend dependencies #23
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 Docker image | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
branches: | |
- main | |
paths: | |
- .github/workflows/docker.yaml | |
- .dockerignore | |
- Dockerfile | |
- cmd/** | |
- internal/** | |
- go.* | |
- web/** | |
- .yarn | |
- .yarnrc.yml | |
- eslint.config.mjs | |
- package.json | |
- postcss.config.mjs | |
- tailwind.config.js | |
- tsconfig.json | |
- vite.config.ts | |
- yarn.lock | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Log in to the container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Determine tag | |
id: determine_tag | |
run: | | |
TAG="${{ (github.ref_type == 'tag' && github.ref_name) || 'latest' }}" | |
echo "tag=${TAG#v}" >> "$GITHUB_OUTPUT" | |
- name: Build and publish | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/alexgustafsson/cupdate:${{ steps.determine_tag.outputs.tag }} | |
labels: | | |
org.opencontainers.image.title=cupdate | |
org.opencontainers.image.description=cupdate keeps track of image updates. | |
org.opencontainers.image.source=https://github.com/AlexGustafsson/cupdate | |
org.opencontainers.image.version=${{ steps.determine_tag.outputs.tag }} | |
org.opencontainers.image.licenses=MIT |