-
Notifications
You must be signed in to change notification settings - Fork 38
39 lines (36 loc) · 1.08 KB
/
publish_docker_images.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
name: publish docker images
on:
#push:
#branches:
#- main
pull_request:
paths:
- '.github/workflows/publish_docker_images.yml'
- '.github/dockerfiles/**'
jobs:
publish-docker-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
env:
REGISTRY: ghcr.io/uxlfoundation
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker images
run: |
#for dockerfile in ${{ github.workspace }}/.github/dockerfiles/Dockerfile_* ; do
for dockerfile in ${{ github.workspace }}/.github/dockerfiles/Dockerfile_24.04 ; do
VERSION=${dockerfile##*_}
docker build . -f $dockerfile --tag $REGISTRY/ock_test_ubuntu_$VERSION:latest
docker push $REGISTRY/ock_test_ubuntu_$VERSION:latest
done