Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
taukakao committed Jan 29, 2024
1 parent 6bf2208 commit b2f01ad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/vib-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: ${{ github.actor }}
DIGEST_RELEASE_TAG: save-digest

jobs:
check_update:
Expand All @@ -20,12 +20,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install jq

- name: Check if there was an update to the base image
if: github.event_name != 'schedule'
run: |
sudo apt-get install jq
bash ${GITHUB_WORKSPACE}/.github/workflows/check_image_update.sh
echo "exitcode=$?" >> "$GITHUB_OUTPUT"
curl https://github.com/${{ github.repository }}/releases/download/${{ env.DIGEST_RELEASE_TAG }}/digest.txt
curl https://differ.vanillaos.org/images/desktop > vanilla-image-info
echo "digest=$(jq -r '.image.releases[-1].digest' vanilla-image-info)" > digest.txt
Expand All @@ -34,10 +37,11 @@ jobs:
run: |
echo "exitcode=0" >> "$GITHUB_OUTPUT"
- uses: softprops/action-gh-release@v1
- name: Upload new digest
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "save-digest"
tag_name: "${{ env.DIGEST_RELEASE_TAG }}"
prerelease: true
name: "This keeps track of the current digest"
files: |
Expand Down Expand Up @@ -79,5 +83,5 @@ jobs:
# - name: Push To GHCR
# if: github.repository == 'vanilla-os/desktop-image'
# run: |
# docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
# docker login ghcr.io -u ${{ env.GITHUB_USER }} -p ${{ secrets.GITHUB_TOKEN }}
# docker image push "ghcr.io/vanilla-os/desktop:main"

0 comments on commit b2f01ad

Please sign in to comment.