Skip to content

Merge pull request #702 from traPtitech/dependabot/go_modules/github.… #23

Merge pull request #702 from traPtitech/dependabot/go_modules/github.…

Merge pull request #702 from traPtitech/dependabot/go_modules/github.… #23

Workflow file for this run

name: Release
on:
push:
tags:
- v*
env:
IMAGE_NAME: trap-collection-server
jobs:
image:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Set IMAGE_TAG env
run: echo "IMAGE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: docker/production/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/traptitech/${{ env.IMAGE_NAME }}:latest
ghcr.io/traptitech/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max