-
Notifications
You must be signed in to change notification settings - Fork 76
53 lines (45 loc) · 1.27 KB
/
docker.yml
File metadata and controls
53 lines (45 loc) · 1.27 KB
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
49
50
51
52
53
name: Docker image
on:
push:
branches:
- master
paths:
- 'docker/**'
- '.github/workflows/docker.yml'
pull_request:
paths:
- 'docker/**'
- '.github/workflows/docker.yml'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
name: Build & Push Docker Image
runs-on: ubuntu-latest
if: github.repository == 'learning-process/parallel_programming_course'
steps:
- name: Check out code
uses: actions/checkout@v6
- 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: Log in to GHCR
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/ubuntu.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/master' }}
tags: ghcr.io/learning-process/ppc-ubuntu:1.1