-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Utsav Anand <[email protected]>
- Loading branch information
1 parent
8e9eefd
commit d50ee3d
Showing
5 changed files
with
120 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build x86_64 container image into library | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
load: true | ||
push: false | ||
platforms: linux/amd64 | ||
build-args: | | ||
VERSION=latest-dev | ||
GIT_COMMIT=${{ github.sha }} | ||
tags: | | ||
ghcr.io/openfaas/queue-worker:${{ github.sha }} | ||
- | ||
name: Build multi-arch container images (for validation only) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
load: false | ||
push: false | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
build-args: | | ||
VERSION=latest-dev | ||
GIT_COMMIT=${{ github.sha }} | ||
tags: | | ||
ghcr.io/openfaas/queue-worker:${{ github.sha }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- | ||
name: Get tags | ||
id: get_tag | ||
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} | ||
- | ||
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_owner }}/queue-worker" | awk '{print tolower($1)}' | sed -e "s/:refs//") >> $GITHUB_ENV | ||
- | ||
name: Login to Github Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Build and push multi-arch containers images | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
load: false | ||
push: true | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
labels: | | ||
org.opencontainers.image.source=https://github.com/${{ env.USER_REPO }} | ||
build-args: | | ||
VERSION=${{ steps.get_tag.outputs.TAG }} | ||
GIT_COMMIT=${{ github.sha }} | ||
tags: | | ||
${{ env.IMAGE_PREFIX }}:${{ github.sha }} | ||
${{ env.IMAGE_PREFIX }}:${{ steps.get_tag.outputs.TAG }} | ||
${{ env.IMAGE_PREFIX }}:latest |
This file was deleted.
Oops, something went wrong.
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
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