Skip to content

antarcticrainforest is createing a new release #93

antarcticrainforest is createing a new release

antarcticrainforest is createing a new release #93

Workflow file for this run

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}}
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/versions/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 django_evaluation -b versions -v
env:
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
REPO_VERSION: ${{ steps.repository.outputs.tag }}