Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
antmelekhin committed Aug 26, 2024
1 parent c5138d9 commit 1155b66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ jobs:
uses: 'docker/setup-buildx-action@v3'

- name: 'Login to DockerHub'
if: ${{ github.event_name != 'pull_request' }}
uses: 'docker/login-action@v3'
with:
username: 'antmelekhin'
password: ${{ secrets.DOCKER_HUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 'Build and push ${{ matrix.tag }}'
uses: 'docker/build-push-action@v6'
Expand All @@ -104,5 +105,5 @@ jobs:
context: .
file: '${{ matrix.dockerfile }}'
platforms: '${{ matrix.platforms }}'
push: true
tags: 'antmelekhin/docker-systemd:${{ matrix.tag }}'
push: ${{ github.event_name != 'pull_request' }}
tags: '${{ github.repository }}:${{ matrix.tag }}'
4 changes: 2 additions & 2 deletions .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: 'DockerHub Description'
uses: 'peter-evans/dockerhub-description@v4'
with:
username: 'antmelekhin'
password: ${{ secrets.DOCKER_HUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
short-description: ${{ github.event.repository.description }}
enable-url-completion: true
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
name: 'Release'
on:
push:
workflow_run:
workflows: ['Build docker images']
types: ['completed']
branches: ['main']

jobs:
release:
name: 'Release'
runs-on: 'ubuntu-latest'
# Skip running release workflow on forks
if: github.repository_owner == 'antmelekhin'
if: ${{ github.repository_owner == 'antmelekhin' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 'Checkout the codebase'
uses: 'actions/checkout@v4'
Expand Down

0 comments on commit 1155b66

Please sign in to comment.