-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (40 loc) · 1.21 KB
/
labs344-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: labs344-build
on:
workflow_dispatch:
push:
paths:
- containers/labs344/**
- .github/workflows/labs344-build.yml # Self-trigger
env:
REGISTRY: ghcr.io/bouncmpe
IMAGE_NAME: labs344
IMAGE_TAG: 2024-2025-1
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup QEMU setup
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: containers/labs344
provenance: mode=max
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}