Skip to content

Commit

Permalink
Update Publish.yml
Browse files Browse the repository at this point in the history
additional fix for #566
  • Loading branch information
scottyhq authored Jul 2, 2024
1 parent df1786d commit 5f7edd8
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Re-tag staging SHA-tagged image with git tag and 'latest'
# tags can be anything, but typically calver string (2020.06.10)
# Re-tag current image:master with image:TAG and image:latest
# tags can be anything, but typically calver string (2024.07.02)
name: Publish
on:
push:
Expand All @@ -8,7 +8,6 @@ on:

env:
DOCKER_ORG: pangeo
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}

jobs:
Expand All @@ -20,23 +19,9 @@ jobs:
name: ${{ matrix.IMAGE }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up disk space
run: |
df -h
docker image ls
sudo apt clean
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- name: Set Job Environment Variables
run: |
SHA7="${GITHUB_SHA::7}"
TAG="${GITHUB_REF##*/}"
echo "SHA7=${SHA7}" >> $GITHUB_ENV
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Set up Docker Buildx
Expand All @@ -57,12 +42,12 @@ jobs:

- name: Create New DockerHub Tags
run: |
docker buildx imagetools create ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} \
docker buildx imagetools create ${DOCKER_ORG}/${{ matrix.IMAGE }}:master \
-t ${DOCKER_ORG}/${{ matrix.IMAGE }}:latest \
-t ${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}
- name: Create New Quay.io Tags
run: |
docker buildx imagetools create quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} \
docker buildx imagetools create quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:master \
-t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest \
-t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}
-t quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG}

0 comments on commit 5f7edd8

Please sign in to comment.