Skip to content

Commit

Permalink
add release workflow (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Feb 23, 2023
1 parent 454c31c commit eb10dd3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Setting vars for later access
id: set_vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub Packages
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ format('ghcr.io/b310-digital/teammapper:{0}', steps.set_vars.outputs.tag) }}
ghcr.io/b310-digital/teammapper:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit eb10dd3

Please sign in to comment.