-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (36 loc) · 1.17 KB
/
dockerImagePublish.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: Image Publish
on:
push:
branches:
- '*'
release:
types: [published]
env:
IMAGE_NAME: build
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Free disk space
run: |
du -sh "/*"
df -H
apt-get clean
du -sh "/*"
df -H
- name: Build the container image
run: buildah build --file Dockerfile --tag image --layers=false --squash
- name: Log into registry
#run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
run: echo "${{ secrets.GITHUB_TOKEN }} | podman login --username ${{ github.actor }} --password-stdin ghcr.io
# - name: Push image
# run: |
# # Image ID must be lowercase
# IMAGE_ID=docker.pkg.github.com/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')/$IMAGE_NAME
# # Strip git ref prefix from version
# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# echo IMAGE_ID=$IMAGE_ID
# echo VERSION=$VERSION
# docker tag image $IMAGE_ID:$VERSION
# docker push $IMAGE_ID:$VERSION