Skip to content

Update ci.yml to run in main branch #3

Update ci.yml to run in main branch

Update ci.yml to run in main branch #3

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
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