Skip to content

Commit

Permalink
Update GH Actions config (main.yml)
Browse files Browse the repository at this point in the history
  • Loading branch information
TyIsI committed May 16, 2024
1 parent 7fe5f47 commit ef092c0
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,34 @@ name: Docker Image CI

on:
push:
branches:
- 'master'
tags:
- 'v*'
branches: ["main"]
tags: ["v*"]
pull_request:
branches:
- 'master'
branches: ["main"]

jobs:
docker:
build:
runs-on: ubuntu-latest

steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
- name: Checkout
uses: actions/checkout@v4

- name: Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_TEMPLATE }}
-
name: Login to DockerHub

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down

0 comments on commit ef092c0

Please sign in to comment.