update to use latest go and support multi platform docker images #72
Workflow file for this run
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
name: CICD | |
on: | |
push: | |
branches: | |
- main | |
- test | |
pull_request: | |
branches: | |
- main | |
create: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.21.x' | |
- name: CI | |
run: make ci | |
- name: Login to DockerHub Registry | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Get the version | |
id: vars | |
run: echo "tag=$(echo ${GITHUB_REF} | cut -d '/' -f3)" >> $GITHUB_OUTPUT | |
- name: Build and push the Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./build/package/Dockerfile | |
push: true | |
tags: kevholditch/pagerduty-slack-sync:${{steps.vars.outputs.tag}}, kevholditch/pagerduty-slack-sync:latest | |
platforms: linux/amd64,linux/arm64 | |