Merge pull request #453 from betadots/add_manual_trigger #262
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 publish a 🛢️ container | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
workflow_dispatch: | |
env: | |
TAG: ${{ github.ref_name == 'main' && 'development' || github.ref_name }} | |
jobs: | |
build-and-push-container: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: voxpupuli/gha-build-and-publish-a-container@v2 | |
with: | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
build_arch: linux/amd64,linux/arm64 | |
docker_username: ${{ vars.DOCKERHUB_USER }} | |
docker_password: ${{ secrets.DOCKERHUB_TOKEN }} | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ env.TAG }} | |
ghcr.io/${{ github.repository }}:latest | |
docker.io/${{ github.repository }}:${{ env.TAG }} | |
docker.io/${{ github.repository }}:latest | |
- name: Update Docker Hub Description | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: ${{ vars.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} |