-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.9 KB
/
publish.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Create Release
on:
push:
branches:
- main
permissions:
contents: read
jobs:
semantic-release:
permissions:
contents: write # for codfish/semantic-release-action to create release tags
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.semantic.outputs.new_release_version }}
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: cycjimmy/semantic-release-action@61680d0e9b02ff86f5648ade99e01be17f0260a4 # v4.0.0
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
needs: semantic-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
env:
RELEASE_VERSION: ${{ needs.semantic-release.outputs.release-version }}
with:
push: true
tags: "flanksource/base-image:latest,flanksource/base-image:v${{ env.RELEASE_VERSION }}"
platforms: linux/amd64,linux/arm64
- name: Build and push
uses: docker/build-push-action@v6
env:
RELEASE_VERSION: ${{ needs.semantic-release.outputs.release-version }}
with:
push: true
file: Dockerfile.canary-checker
tags: "flanksource/base-image-canary-checker:latest,flanksource/base-image-canary-checker:v${{ env.RELEASE_VERSION }}"
platforms: linux/amd64,linux/arm64