Skip to content

Commit a8407cf

Browse files
committed
Fix workflow definition
1 parent 9a5676d commit a8407cf

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
env:
22
CONTAINER_IMAGE_TAG: githubchangeloggenerator/github-changelog-generator:latest
3-
PUSH_IMAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
43

54
name: Build and deploy latest image
65

76
on: [push, pull_request]
87

98
jobs:
10-
lint:
9+
build:
1110
name: Lint the codebase
1211
runs-on: ubuntu-20.04
1312
steps:
@@ -19,12 +18,6 @@ jobs:
1918
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2019
LINTER_RULES_PATH: .
2120
VALIDATE_ALL_CODEBASE: true
22-
build:
23-
name: Build and test the container image
24-
needs: lint
25-
runs-on: ubuntu-20.04
26-
steps:
27-
- uses: actions/[email protected]
2821
- name: Setup Docker Buildx
2922
uses: docker/setup-buildx-action@v1
3023
- name: Set up QEMU
@@ -42,13 +35,13 @@ jobs:
4235
run: docker run ${{ env.CONTAINER_IMAGE_TAG }}
4336
deploy:
4437
environment: Docker Hub
45-
if: ${{ env.PUSH_IMAGES }}
38+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
4639
name: Deploy the container image
4740
needs: build
4841
runs-on: ubuntu-20.04
4942
steps:
5043
- name: Login to Docker Hub
51-
uses: docker/login-action@v1
44+
uses: docker/login-action@v1
5245
with:
5346
username: ${{ secrets.DOCKERHUB_USERNAME }}
5447
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -58,5 +51,5 @@ jobs:
5851
context: .
5952
file: ./Dockerfile
6053
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
61-
push: ${{ env.PUSH_IMAGES }}
54+
push: true
6255
tags: ${{ env.CONTAINER_IMAGE_TAG }}

0 commit comments

Comments
 (0)