Skip to content

Commit

Permalink
use verbatim action yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
vordimous committed Feb 28, 2024
1 parent a2f1d54 commit bf18ec2
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
name: Build and Push mqtt-simulator image to ghcr.io
name: ci

on:
schedule:
- cron: "0 10 * * *"
push:
branches:
- "master"
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "master"

env:
IMAGE_NAME: mqtt-simulator
- "main"

jobs:
buildx-push:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -44,13 +33,17 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
driver-opts: network=host
platforms: linux/amd64,linux/arm64

registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit bf18ec2

Please sign in to comment.