Skip to content

Commit

Permalink
CI bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rylorin committed Feb 15, 2024
1 parent 86bee0f commit 2325d5c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ on:
jobs:
docker:
runs-on: ubuntu-latest
env:
IMAGE_NAME: postfix-relay
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Helper for custom repo name
id: reponame
run: |
Expand All @@ -24,6 +27,7 @@ jobs:
fi
env:
DOCKER_REPO: "${{ secrets.DOCKER_REPO }}"

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
Expand All @@ -37,16 +41,20 @@ jobs:
type=sha
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: docker build -t $IMAGE_NAME .

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push master as latest
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
Expand All @@ -55,8 +63,9 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
push: true
tags: mwader/postfix-relay:latest
tags: ${{ github.repository }}:latest
labels: ${{ steps.docker_meta.outputs.labels }}

- name: Build and push branch or test PR
if: github.ref != 'refs/heads/master'
uses: docker/build-push-action@v2
Expand Down

0 comments on commit 2325d5c

Please sign in to comment.