-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.41 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release
# This Github Action workflow is triggered, when a new release is published.
on:
release:
types: [published]
jobs:
build_and_push_container_image:
name: Build and push container image
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
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/[email protected]
with:
registry: ghcr.io
username: obmondo
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push AMD64 and ARM64 container images
uses: docker/build-push-action@v4
with:
context: .
file: build/Dockerfile
# NOTE : It takes pretty long to build container images for the ARM64 platform (even when
# using QEMU).
platforms: linux/amd64,linux/arm64
tags: ghcr.io/obmondo/kubeaid-bootstrap-script:${{ github.event.release.tag_name }}
push: true
# Experimental cache exporter for GitHub Actions provided by buildx and BuildKit.
# It uses the GitHub Cache API to fetch and load the Docker layer cache blobs across
# builds.
cache-from: type=gha
cache-to: type=gha,mode=max