Skip to content

Commit

Permalink
Update push cadence
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyanesh Mishra authored and Gyanesh Mishra committed Dec 5, 2023
1 parent d4ad584 commit 3e550ad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build-soci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}

- name: Push image with containerd
env:
tags: ${{ steps.meta.outputs.tags }}
run: |
for tag in $tags
do
echo "Pushing $tag to GHCR"
sudo ctr i push --user "${{ github.repository_owner }}:${{ secrets.GHCR_PAT }}" $tag
done
- name: Create and push soci index
env:
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -102,10 +112,11 @@ jobs:
sudo $SOCI_PATH push --user ${{ github.repository_owner }}:${{ secrets.GHCR_PAT }} $tag
done
- name: Push image with containerd
- name: Push image with containerd (again) to ensure latest tag is "latest"
env:
tags: ${{ steps.meta.outputs.tags }}
run: |
# We do this because if soci index is the last one pushed, it messes up the quick start on GHCR
for tag in $tags
do
echo "Pushing $tag to GHCR"
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}


- name: Push image with containerd
env:
tags: ${{ steps.meta.outputs.tags }}
run: |
for tag in $tags
do
echo "Pushing $tag to GHCR"
sudo ctr i push --user "${{ github.repository_owner }}:${{ secrets.GHCR_PAT }}" $tag
done
- name: Create and push soci index
env:
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -104,10 +115,11 @@ jobs:
sudo $SOCI_PATH push --user ${{ github.repository_owner }}:${{ secrets.GHCR_PAT }} $tag
done
- name: Push image with containerd
- name: Push image with containerd (again) to ensure latest tag is "latest"
env:
tags: ${{ steps.meta.outputs.tags }}
run: |
# We do this because if soci index is the last one pushed, it messes up the quick start on GHCR
for tag in $tags
do
echo "Pushing $tag to GHCR"
Expand Down

0 comments on commit 3e550ad

Please sign in to comment.