Skip to content

Commit

Permalink
Fix/fix actions (#29)
Browse files Browse the repository at this point in the history
* Change PR event trigger to `pull_request`, it is a public repo

* Add suffix `reusable` to reusable docker workflow

* Set `latest` tag to latest main build
  • Loading branch information
damyan authored Mar 1, 2024
1 parent 92eb087 commit ad707c2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Dependabot auto-approve
on: pull_request_target
on: pull_request

permissions:
pull-requests: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- main
paths:
- 'dev/Dockerfile'
pull_request_target:
pull_request:
paths:
- 'dev/Dockerfile'
workflow_dispatch:

jobs:
buildAndPush:
uses: ./.github/workflows/publish-docker.yaml
uses: ./.github/workflows/publish-docker-reusable.yaml
with:
image: dev
6 changes: 3 additions & 3 deletions .github/workflows/publish-docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
- v*
paths:
- 'base/Dockerfile'
pull_request_target:
pull_request:
paths:
- 'base/Dockerfile'
workflow_dispatch:

jobs:
buildAndPushBase:
uses: ./.github/workflows/publish-docker.yaml
uses: ./.github/workflows/publish-docker-reusable.yaml
with:
image: base

Expand All @@ -27,6 +27,6 @@ jobs:
- name: dev
- name: net
max-parallel: 2
uses: ./.github/workflows/publish-docker.yaml
uses: ./.github/workflows/publish-docker-reusable.yaml
with:
image: ${{ matrix.image.name }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker-net.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- main
paths:
- 'net/Dockerfile'
pull_request_target:
pull_request:
paths:
- 'net/Dockerfile'
workflow_dispatch:

jobs:
buildAndPush:
uses: ./.github/workflows/publish-docker.yaml
uses: ./.github/workflows/publish-docker-reusable.yaml
with:
image: net
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
type=ref,event=tag
type=ref,event=pr
type=sha
type=raw,value=latest,enable=${{ is_default_branch }}
flavor: |
latest=auto
- name: Set up QEMU
Expand All @@ -48,7 +49,7 @@ jobs:
version: latest
endpoint: builders # self-hosted
- name: Login to GHCR
if: github.event_name != 'pull_request_target'
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -60,7 +61,7 @@ jobs:
with:
context: ${{ inputs.image }}
platforms: ${{ env.platforms }}
push: ${{ github.event_name != 'pull_request_target' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secrets: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request_target:
pull_request:

jobs:
update_release_draft:
Expand Down

0 comments on commit ad707c2

Please sign in to comment.