1- name : ' build docker images: AdminerEvo '
1+ name : ' build docker images: Adminer '
22
33on :
44 # push:
55 # branches:
66 # - 'main'
77 # - 'master'
88 # paths:
9- # - 'adminerevo.wolfi .Dockerfile'
10- # - '.github/workflows/build_docker_images-adminerevo .yaml'
9+ # - 'adminer_standalone_extended.multiarch.alpine .Dockerfile'
10+ # - '.github/workflows/build_docker_images-adminer .yaml'
1111 workflow_dispatch :
1212 schedule :
1313 - cron : ' 45 8 28 * *' # At 07:45 on day-of-month 28.
@@ -28,25 +28,20 @@ jobs:
2828 run : |
2929 BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
3030 BUILD_DATE_NUMERIC="${BUILD_DATE//[^[:digit:]]/}"
31- COMMIT_HASH=${GITHUB_SHA::7}
32- GIT_URL=$(echo "${GITHUB_SERVER_URL}" | awk -F/ '{print $3}' | sed 's/\/*$//')
33- GIT_URL=$(echo "$GIT_URL" | sed 's/github\.com/ghcr\.io/g') # GIT_URL switch to ghcr.io registry for GitHub
34- GIT_REPO=${GITHUB_REPOSITORY,,}
35- GIT_REPO_SHORT=${GIT_REPO#*/}
36- GIT_REPO_SHORT=${GIT_REPO_SHORT#"docker-"}
37- DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GIT_REPO_SHORT}
38- REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GIT_REPO_SHORT}
39-
40- #echo "ENVs: BUILD_DATE=${BUILD_DATE}, BUILD_DATE_NUMERIC=${BUILD_DATE_NUMERIC}, COMMIT_HASH=${COMMIT_HASH}, GIT_URL=${GIT_URL}, GIT_REPO=${GIT_REPO}"
31+ COMMIT_HASH=${GITHUB_SHA::8}
32+ GITHUB_REPO=${GITHUB_REPOSITORY,,}
33+ GITHUB_REPO_SHORT=${GITHUB_REPO#*/}
34+ GITHUB_REPO_SHORT=${GITHUB_REPO_SHORT#"docker-"}
35+ DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
36+ REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
4137
42- # Set output parameters to action.
43- echo "build_date=${BUILD_DATE}" >> "$GITHUB_OUTPUT"
44- echo "build_date_numeric=${BUILD_DATE_NUMERIC}" >> "$GITHUB_OUTPUT"
45- echo "commit_hash=${COMMIT_HASH}" >> "$GITHUB_OUTPUT"
46- echo "git_url=${GIT_URL}" >> "$GITHUB_OUTPUT"
47- echo "git_repo=${GIT_REPO}" >> "$GITHUB_OUTPUT"
48- echo "docker_repo=${DOCKER_REPO}" >> "$GITHUB_OUTPUT"
49- echo "redhat_quay_repo=${REDHAT_QUAY_REPO}" >> "$GITHUB_OUTPUT"
38+ # Set output parameters to github action.
39+ echo ::set-output name=build_date::${BUILD_DATE}
40+ echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
41+ echo ::set-output name=commit_hash::${COMMIT_HASH}
42+ echo ::set-output name=github_repo::${GITHUB_REPO}
43+ echo ::set-output name=docker_repo::${DOCKER_REPO}
44+ echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
5045
5146 - name : Set up QEMU
5247 id : qemu
@@ -57,16 +52,16 @@ jobs:
5752
5853 - name : Set up Docker Buildx
5954 id : buildx
60- uses : docker/setup-buildx-action@v3
55+ uses : docker/setup-buildx-action@v3
6156
62- - name : Login to GIT Container Registry
57+ - name : Login to GitHub Container Registry
6358 uses : docker/login-action@v3
6459 with :
65- registry : ${{ steps.script.outputs.git_url }}
60+ registry : ghcr.io
6661 username : ${{ github.repository_owner }}
6762 password : ${{ secrets.GITHUB_TOKEN }}
6863
69- - name : Login to DockerHub Container Registry
64+ - name : Login to DockerHub
7065 uses : docker/login-action@v3
7166 with :
7267 registry : docker.io
@@ -85,13 +80,14 @@ jobs:
8580 with :
8681 builder : ${{ steps.buildx.outputs.name }}
8782 context : .
88- file : ./adminerevo.wolfi .Dockerfile
89- platforms : linux/amd64,linux/arm64
83+ file : ./adminer_standalone_extended.multiarch.alpine .Dockerfile
84+ platforms : linux/amd64,linux/arm64/v8,linux/arm/v7
9085 push : true
9186 build-args : |
9287 BUILD_DATE=${{steps.script.outputs.build_date}}
9388 VCS_REF=${{steps.script.outputs.commit_hash}}
9489 tags : |
95- docker.io/${{steps.script.outputs.docker_repo}}:adminerevo
96- quay.io/${{steps.script.outputs.redhat_quay_repo}}:adminerevo
97- ${{steps.script.outputs.git_url}}/${{steps.script.outputs.git_repo}}:adminerevo
90+ ghcr.io/${{steps.script.outputs.github_repo}}:adminer-${{steps.script.outputs.build_date_numeric}}.${{steps.script.outputs.commit_hash}}
91+ ghcr.io/${{steps.script.outputs.github_repo}}:adminer
92+ docker.io/${{steps.script.outputs.docker_repo}}:adminer
93+ quay.io/${{steps.script.outputs.redhat_quay_repo}}:adminer
0 commit comments