mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-02 23:05:48 +02:00
Update docker-image.yml
Signed-off-by: Joe Hanson <joe@veri.dev>
This commit is contained in:
parent
a5de96d9b0
commit
f6b39a59cd
1 changed files with 29 additions and 9 deletions
38
.github/workflows/docker-image.yml
vendored
38
.github/workflows/docker-image.yml
vendored
|
@ -3,16 +3,36 @@ name: Docker Image CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
docker:
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
-
|
||||||
- name: Build the Docker image
|
name: Checkout
|
||||||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
-
|
||||||
|
name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
user/app:latest
|
||||||
|
user/app:1.0.0
|
||||||
|
ghcr.io/user/app:latest
|
||||||
|
ghcr.io/user/app:1.0.0
|
||||||
|
|
Loading…
Reference in a new issue