Skip to content

Commit

Permalink
ci: add main branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
TyIsI committed Jun 25, 2024
1 parent f2b7d19 commit 8b6c0f6
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Expand Down

0 comments on commit 8b6c0f6

Please sign in to comment.