Skip to content

ghcr.io Publish

ghcr.io Publish #79

Workflow file for this run

name: ghcr.io Publish
# when a new release is created or new tag is pushed to master
# tag should be in the format v1.0.0
# v1.0.0-alpha.1 is also valid
# regex to check the tag format
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]+'
- 'v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z]+)+.[0-9]?'
jobs:
build:
uses: ./.github/workflows/npm_build.yml
publish:
runs-on: ubuntu-latest
needs: build
if: needs.build.result == 'success'
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: PATH=$PATH:$(pwd) bin/ubuntu-setup.sh
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Build and publish "Lock Manager" image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash bin/ghcr-publish.sh lock-manager $RELEASE_VERSION "y" $GITHUB_TOKEN
- name: Build and publish "Brownie" image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash bin/ghcr-publish.sh brownie $RELEASE_VERSION "y" $GITHUB_TOKEN