CI #2
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build-n-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
cache: false | |
- name: Build Linux binary | |
run: GOOS=linux GOARCH=amd64 go build | |
- name: Build Docker image | |
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/az-appservice . | |
- name: Login to Docker Hub | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Docker push | |
run: docker push ${{ secrets.DOCKER_USERNAME }}/az-appservice |