Skip to content

Commit

Permalink
CI messing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Feb 22, 2024
1 parent f2a84d2 commit 1e5e0ea
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/dockerImagePublish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Docker Image Publish
name: Image Publish

on:
push:
branches:
- '*'
release:
types: [published]

Expand All @@ -16,21 +19,22 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build the Docker image
run: docker build . --file Dockerfile --tag image
- 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 }}" | 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,')
# - 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
# echo IMAGE_ID=$IMAGE_ID
# echo VERSION=$VERSION

docker tag image $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# docker tag image $IMAGE_ID:$VERSION
# docker push $IMAGE_ID:$VERSION

0 comments on commit 1e5e0ea

Please sign in to comment.