Skip to content

[Feat] Network infos #386

[Feat] Network infos

[Feat] Network infos #386

Workflow file for this run

name: Automatic build and push
on:
push:
branches:
- "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docker:
name: "Docker build"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
if: ${{ github.event_name != 'pull_request' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: release
pre_release_branches: main
default_bump: minor
default_prerelease_bump: prepatch
append_to_pre_release_tag: rc
- name: Build
if: ${{ startsWith(github.ref,'refs/heads/') || github.event_name == 'pull_request' }}
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ENV=prod
- name: Build and push staging version
if: ${{ ! github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
push: true
tags: |
ghcr.io/marigold-dev/tzsafe:${{ steps.tag_version.outputs.new_version}}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ENV=dev
- name: Build and push release version
if: ${{ ! github.event_name != 'pull_request' && github.ref == 'refs/heads/release' }}
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
push: true
tags: |
ghcr.io/marigold-dev/tzsafe:stable
ghcr.io/marigold-dev/tzsafe:${{ steps.tag_version.outputs.new_version}}-release
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ENV=prod