Skip to content

Commit

Permalink
Upgrade publish job
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Jan 24, 2023
1 parent 0310ec6 commit ca12fd3
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,37 @@ jobs:
- uses: actions/checkout@master
with:
fetch-depth: 1

- name: Get TAG
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV

- name: Get Repo Owner
id: get_repo_owner
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Docker Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: alexellis
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

- name: Local build
id: local_build
uses: docker/build-push-action@v2
with:
build-args: |
Version=${{ steps.get_tag.outputs.TAG }}
Version=${{ env.TAG }}
GitCommit=${{ github.sha }}
outputs: "type=registry,push=true"
platforms: linux/amd64,linux/arm/v6,linux/arm64
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: |
ghcr.io/alexellis/registry-creds:${{ github.sha }}
ghcr.io/alexellis/registry-creds:${{ steps.get_tag.outputs.TAG }}
ghcr.io/alexellis/registry-creds:latest
ghcr.io/${{ env.REPO_OWNER }}/registry-creds:${{ github.sha }}
ghcr.io/${{ env.REPO_OWNER }}/registry-creds:${{ env.TAG }}
ghcr.io/${{ env.REPO_OWNER }}/registry-creds:latest

0 comments on commit ca12fd3

Please sign in to comment.