chore: switch to upstream docker build and cache #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |