Skip to content

Commit

Permalink
Push container when tag pushed
Browse files Browse the repository at this point in the history
Signed-off-by: Akos Veres <veres@akos.me>
  • Loading branch information
akosveres authored and alexellis committed Nov 6, 2020
1 parent ef58bec commit 9123359
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: publish

on:
push:
tags:
- '*'

jobs:
publish:
strategy:
matrix:
go-version: [1.13.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Get TAG
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: build
run: make build
- name: get tools
run: ./contrib/get_tools.sh
- name: lint chart
run: ./contrib/lint_chart.sh
- name: create cluster
run: ./contrib/create_cluster.sh
- name: deploy deploy
run: OPERATOR=0 ./contrib/deploy.sh
- name: run function
run: ./contrib/run_function.sh
- name: stop dev cluster
run: ./contrib/stop_dev.sh
- name: Sleep for 10 seconds
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: create cluster
run: ./contrib/create_cluster.sh
- name: deploy function
run: OPERATOR=1 ./contrib/deploy.sh
- name: run function
run: OPERATOR=1 ./contrib/run_function.sh
- name: stop dev cluster
run: ./contrib/stop_dev.sh

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
- name: Push containers
uses: docker/build-push-action@v2
with:
outputs: "type=registry,push=true"
platforms: linux/amd64,linux/arm/v6,linux/arm64
tags: |
ghcr.io/openfaas/faas-netes:${{ github.sha }}
ghcr.io/openfaas/faas-netes:${{ steps.get_tag.outputs.TAG }}
ghcr.io/openfaas/faas-netes:latest

0 comments on commit 9123359

Please sign in to comment.