Deploy #62
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: Deploy | |
on: | |
workflow_run: | |
workflows: ["Build"] | |
types: | |
- completed | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Checkout | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# fetch github metadata | |
#---------------------------------------------- | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{github.repository}} | |
tags: | | |
type=raw,value={{sha}}-{{date 'YYYYMMDDhhmmss'}} | |
#---------------------------------------------- | |
# setup extra builder | |
#---------------------------------------------- | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
#---------------------------------------------- | |
# Login to github container registry | |
#---------------------------------------------- | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
#---------------------------------------------- | |
# Push to registry | |
#---------------------------------------------- | |
- name: Publish to Registry | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }}, | |
labels: ${{ steps.meta.outputs.labels }} |