Creating container images 🧉 #35
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: Creating container images | |
run-name: Creating container images 🧉 | |
# Set the access for individual scopes, or use permissions: write-all | |
permissions: | |
pull-requests: write | |
contents: write | |
packages: write | |
# on: | |
# pull_request: | |
# types: [closed] | |
# branches: | |
# - main | |
on: | |
push: | |
branches: ["**"] | |
tags: | |
- "v*.*.*" | |
jobs: | |
deployment-image-linux: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Python 3.X | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.X" | |
- | |
name: Get tag | |
id: repository | |
run: | | |
echo "tag=$(python src/freva_deployment/__init__.py -v)" >> $GITHUB_OUTPUT | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- | |
name: Create Buildx builder | |
run: docker buildx create --use --name mybuilder --driver docker-container | |
- | |
name: Inspect Buildx builder | |
run: docker buildx inspect --bootstrap | |
- | |
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 deployment image | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
build-args: VERSION=${{steps.repository.outputs.tag}} | |
tags: | | |
ghcr.io/freva-clint/freva-deployment:${{ steps.repository.outputs.tag }} | |
ghcr.io/freva-clint/freva-deployment:latest | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/i386,linux/s390x | |
build-and-push-vault-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Python 3.X | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.X" | |
- | |
name: Get tag | |
id: repository | |
run: | | |
echo "tag=$(python src/freva_deployment/__init__.py -v)" >> $GITHUB_OUTPUT | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- | |
name: Create Buildx builder | |
run: docker buildx create --use --name mybuilder --driver docker-container | |
- | |
name: Inspect Buildx builder | |
run: docker buildx inspect --bootstrap | |
- | |
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 vault image | |
uses: docker/build-push-action@v4 | |
with: | |
context: assets/share/freva/deployment/vault/ | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: VERSION=${{steps.repository.outputs.tag}} | |
tags: | | |
ghcr.io/freva-clint/freva-vault:${{ steps.repository.outputs.tag }} | |
ghcr.io/freva-clint/freva-vault:latest |