This repository has been archived by the owner on Sep 22, 2024. It is now read-only.
fix(deps): update rust crate serde to v1.0.209 (#195) #197
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: Publish Docker Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
get_next_version: | |
runs-on: ubuntu-latest | |
name: Fetch next version number | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: semantic release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
dry_run: true | |
working_directory: .github/fetch_version | |
- run: echo ${{ steps.semantic.outputs.new_release_version }} | |
- run: echo ${{ steps.semantic.outputs.new_release_published }} | |
outputs: | |
create_release: ${{ steps.semantic.outputs.new_release_published }} | |
new_version: ${{ steps.semantic.outputs.new_release_version }} | |
build_images: | |
needs: get_next_version | |
if: needs.get_next_version.outputs.create_release == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and Push | |
id: docker_build | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
build-args: | | |
BUILD_VERSION=${{ needs.get_next_version.outputs.new_version }} | |
COMMIT_SHA=${{ github.sha }} | |
tags: | | |
ghcr.io/wirepact/k8s-basic-auth-translator:latest | |
ghcr.io/wirepact/k8s-basic-auth-translator:${{ github.sha }} | |
ghcr.io/wirepact/k8s-basic-auth-translator:${{ needs.get_next_version.outputs.new_version }} | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |