Skip to content

Commit

Permalink
Update version of Docker actions
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Sep 15, 2023
1 parent c916c97 commit d12888b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@ jobs:
uses: actions/checkout@master
with:
fetch-depth: 1
-
name: Set Username/Repo as ENV vars
run: echo "USER_REPO"=$(echo "$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
-
name: Local docker build (non-root image)
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand All @@ -40,12 +37,12 @@ jobs:
build-args: |
VERSION=latest-dev
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/${{ env.USER_REPO }}
REPO_URL=https://github.com/openfaas/faas-cli
load: true
tags: openfaas/faas-cli:${{ github.sha }}
-
name: Test for multi-arch build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand All @@ -56,7 +53,7 @@ jobs:
build-args: |
VERSION=latest-dev
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/${{ env.USER_REPO }}
REPO_URL=https://github.com/openfaas/faas-cli
tags: openfaas/faas-cli:${{ github.sha }}
-
name: Copy binary to host
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ jobs:
-
name: Set Username/Repo and ImagePrefix as ENV vars
run: |
echo "USER_REPO"=$(echo "$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV && \
echo "IMAGE_PREFIX"=$(echo "ghcr.io/$GITHUB_REPOSITORY" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -56,7 +55,7 @@ jobs:
build-args: |
VERSION=${{ env.TAG }}
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/${{ env.USER_REPO }}
REPO_URL=https://github.com/openfaas/faas-cli
push: true
tags: |
${{ env.IMAGE_PREFIX }}:${{ github.sha }}
Expand All @@ -73,15 +72,15 @@ jobs:
build-args: |
VERSION=${{ env.TAG }}
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/${{ env.USER_REPO }}
REPO_URL=https://github.com/openfaas/faas-cli
push: true
tags: |
${{ env.IMAGE_PREFIX }}:${{ github.sha }}-root
${{ env.IMAGE_PREFIX }}:${{ env.TAG }}-root
${{ env.IMAGE_PREFIX }}:latest-root
-
name: Build binaries for multiple environments
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.redist
Expand Down

0 comments on commit d12888b

Please sign in to comment.