Skip to content

Commit

Permalink
CI Fix to not push multiple images on Github Images (#546)
Browse files Browse the repository at this point in the history
* Update ghcr workflow

Signed-off-by: Konstantinos Kallas <[email protected]>

* Change version for new release

Signed-off-by: Konstantinos Kallas <[email protected]>
  • Loading branch information
angelhof authored Apr 28, 2022
1 parent 3694a61 commit 5ff19c4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 19 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
DEBIAN: pash/debian-10
UBUNTU: pash/ubuntu-18.04
FEDORA: pash/fedora-35
IMAGENAME: pash/pash

jobs:
# Push image to GitHub Packages.
Expand All @@ -24,29 +25,45 @@ jobs:
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Build & Push Debian Image
run: |
docker build --tag $DEBIAN --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/debian/Dockerfile .
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$DEBIAN
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag $DEBIAN $IMAGE_ID
docker push $IMAGE_ID
- name: Build & Push Ubuntu Image
run: |
docker build --tag $UBUNTU --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/ubuntu/Dockerfile .
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UBUNTU
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGENAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag $UBUNTU $IMAGE_ID
docker push $IMAGE_ID
- name: Build & Push Fedora Image
run: |
docker build --tag $FEDORA --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/fedora/Dockerfile .
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$FEDORA
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag $FEDORA $IMAGE_ID
docker push $IMAGE_ID
##
## Old pushing of different images per operating system but we don't need to do
## that anymore. A single image is fine. If someone wants to build a docker image with fedora
## they can do it manually. For out testing purposes, we should be able to build and test them,
## but no need to make them publicly available.
##

# - name: Build & Push Debian Image
# run: |
# docker build --tag $DEBIAN --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/debian/Dockerfile .
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$DEBIAN
# # Change all uppercase to lowercase
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# docker tag $DEBIAN $IMAGE_ID
# docker push $IMAGE_ID

# - name: Build & Push Ubuntu Image
# run: |
# docker build --tag $UBUNTU --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/ubuntu/Dockerfile .
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UBUNTU
# # Change all uppercase to lowercase
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# docker tag $UBUNTU $IMAGE_ID
# docker push $IMAGE_ID

# - name: Build & Push Fedora Image
# run: |
# docker build --tag $FEDORA --label "runnumber=${GITHUB_RUN_ID}" -f scripts/docker/fedora/Dockerfile .
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$FEDORA
# # Change all uppercase to lowercase
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# docker tag $FEDORA $IMAGE_ID
# docker push $IMAGE_ID
2 changes: 1 addition & 1 deletion compiler/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from util import *

## Global
__version__ = "0.7" # FIXME add libdash version
__version__ = "0.7.2" # FIXME add libdash version
GIT_TOP_CMD = [ 'git', 'rev-parse', '--show-toplevel', '--show-superproject-working-tree']
if 'PASH_TOP' in os.environ:
PASH_TOP = os.environ['PASH_TOP']
Expand Down

0 comments on commit 5ff19c4

Please sign in to comment.