antarcticrainforest is building the container #77
Workflow file for this run
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 the container image | |
run-name: ${{ github.actor }} is building the container | |
"on": | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
branches: | |
- 'version' | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- | |
name: Get tag | |
id: repository | |
run: | | |
echo "tag=v$(cat package.json|jq -r .version)" >> $GITHUB_OUTPUT | |
echo "repo=$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set docker version label | |
run: sed -i 's/<VERSION>/${{ steps.repository.outputs.tag }}/g' Dockerfile | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
ghcr.io/${{ steps.repository.outputs.repo }}:${{ steps.repository.outputs.tag }} | |
ghcr.io/${{ steps.repository.outputs.repo }}:latest |