antarcticrainforest is createing a new release #100
Workflow file for this run
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: Build and publish the container image | |
run-name: ${{ github.actor }} is createing a new release | |
"on": | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
lint: | |
uses: ./.github/workflows/test_job.yml | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
needs: lint | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Get tag | |
id: repository | |
run: | | |
echo "tag=$(cat package.json|jq -r .version)" >> $GITHUB_OUTPUT | |
echo "repo=$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
build-args: | | |
VERSION=${{steps.repository.outputs.tag}} | |
EMAIL_HOST_PASSWORD=${{secrets.EMAIL_HOST_PASSWORD}} | |
push: true | |
tags: | | |
ghcr.io/${{ steps.repository.outputs.repo }}:${{ steps.repository.outputs.tag }} | |
ghcr.io/${{ steps.repository.outputs.repo }}:latest | |
bump-web-version: | |
runs-on: ubuntu-latest | |
needs: [build-and-push-image, lint] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.X" | |
- name: Install dependencies | |
run: python3 -m pip install git-python packaging requests tomli | |
- name: Get the release script | |
run: > | |
curl -H 'Cache-Control: no-cache' -Ls -o bump.py | |
https://raw.githubusercontent.com/FREVA-CLINT/freva-deployment/main/release.py | |
- name: Get tag | |
id: repository | |
run: | | |
echo "repo=$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT | |
echo "tag=$(cat package.json|jq -r .version)" >> $GITHUB_OUTPUT | |
- name: Do the release job | |
run: python3 bump.py deploy web -v | |
env: | |
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}} | |
REPO_VERSION: ${{ steps.repository.outputs.tag }} |