···
-
SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
-
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
-
image: catthehacker/ubuntu:act-latest
-
uses: actions/checkout@v3
-
echo REGISTRY_DOMAIN=$(echo ${GITHUB_SERVER_URL} | sed 's\^https://\\') >> $GITHUB_OUTPUT
-
uses: https://github.com/docker/setup-qemu-action@v2
-
- name: Set up Docker BuildX
-
uses: https://github.com/docker/setup-buildx-action@v2
-
- name: Login to registry
-
uses: https://github.com/docker/login-action@v2
-
registry: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}
-
username: ${{ github.repository_owner }}
-
password: ${{ secrets.CI_REGISTRY_TOKEN }}
-
- name: Docker metadata
-
uses: https://github.com/docker/metadata-action@v4
-
images: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}
-
org.opencontainers.image.revision=${{ env.SHA }}
-
type=edge,branch=$repo.default_branch
-
type=sha,prefix=,suffix=,format=short
-
type=raw,value=latest,enable={{is_default_branch}}
-
uses: https://github.com/docker/build-push-action@v4
-
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
-
push: ${{ github.event_name != 'pull_request' }}
-
tags: ${{ steps.meta.outputs.tags }}
-
labels: ${{ steps.meta.outputs.labels }}
-
cache-to: type=gha,mode=max
-
# if: ${{ github.event_name == 'pull_request' }}
-
# uses: https://github.com/docker/scout-action@v0.23.4
-
# dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
-
# dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
# # image: ${{ steps.meta.outputs.tags }}
-
# to: ${{ steps.repometa.outputs.REGISTRY_DOMAIN }}/${{ github.repository }}:${{ env.COMPARE_TAG }}
-
# ignore-unchanged: true
-
# github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment