From 8b6c0f6aaa95f687657c6b3c06bb5e497cc0bc2d Mon Sep 17 00:00:00 2001 From: Ty Eggen Date: Tue, 25 Jun 2024 01:19:50 -0700 Subject: [PATCH] ci: add main branch support --- .github/workflows/main.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0ee1db..6ea922b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,37 +3,40 @@ name: Docker Image CI on: push: branches: - - 'master' - - 'trunk' + - "main" + - "master" + - "trunk" tags: - - 'v*' + - "v*" pull_request: branches: - - 'master' - - 'trunk' + - "main" + - "master" + - "trunk" + workflow_dispatch: jobs: docker: runs-on: ubuntu-latest + steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v2 - - - name: Docker meta + + - name: Docker meta id: meta uses: docker/metadata-action@v3 with: images: ${{ vars.DOCKERHUB_TEMPLATE }} - - - name: Login to DockerHub + + - name: Login to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + + - name: Build and push uses: docker/build-push-action@v2 with: context: .