Sosialhjelp update k20a and k20b (#699) #13
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 Docker and push | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE: ${{ github.repository }} | |
jobs: | |
build_and_push_docker: | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set docker image env var | |
run: | | |
echo "DOCKER_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.ref_name }}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build with Gradle | |
run: ./gradlew build -p web --build-cache --info | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./web | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
provenance: false | |
tags: | | |
${{ env.DOCKER_IMAGE }} |