Skip to content

Commit

Permalink
ci: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
schuer committed Dec 17, 2023
1 parent 74d21b0 commit 790d88a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
token: ${{ secrets.GH_WORKFLOW }}

- name: Setup Deno
# https://github.com/denoland/setup-deno
# https://github.com/marketplace/actions/setup-deno
uses: denoland/setup-deno@v1
with:
deno-version: "^1"
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Auto-commit changed files
# Automatically commit files which have been changed during the workflow run and push changes back
# to remote repository.
# https://github.com/stefanzweifel/git-auto-commit-action
# https://github.com/marketplace/actions/git-auto-commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "GenerRRRRR-ate image files from source!"
Expand Down
47 changes: 28 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,48 +55,57 @@ jobs:

steps:
- name: Checkout repository
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up QEMU
# https://github.com/docker/setup-qemu-action
# https://github.com/marketplace/actions/docker-setup-qemu
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
# https://github.com/docker/setup-buildx-action
# https://github.com/marketplace/actions/docker-setup-buildx
uses: docker/setup-buildx-action@v3

# - name: Login to Docker Hub
# # https://github.com/docker/login-action
# # https://github.com/marketplace/actions/docker-login
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
# https://github.com/docker/login-action
# https://github.com/marketplace/actions/docker-login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push
# # https://github.com/docker/build-push-action
# uses: docker/build-push-action@v5
# with:
# context: ./images/${{ matrix.image }}
# platforms: linux/amd64,linux/arm64
# push: true
# # tags: |
# # ${{ env.REGISTRY_IMAGE }}:${{ matrix.image }}
# # ghcr.io/${{ env.REGISTRY_IMAGE }}:${{ matrix.image }}
# tags: |
# ghcr.io/${{ env.REGISTRY_IMAGE }}:${{ matrix.image }}
- name: Collect tags for image
# https://github.com/marketplace/actions/yq-portable-yaml-processor
uses: mikefarah/yq@v4
id: collect_tags
with:
cmd: yq '.tags | @csv' ./images/${{ matrix.image }}/tags.yml

- name: Build and push
# https://github.com/marketplace/actions/build-and-push-docker-images
uses: docker/build-push-action@v5
with:
context: ./images/${{ matrix.image }}
platforms: linux/amd64,linux/arm64
push: true
provenance: false
# tags: |
# ${{ env.REGISTRY_IMAGE }}:${{ steps.collect_tags.outputs.result }}
# ghcr.io/${{ env.REGISTRY_IMAGE }}:${{ steps.collect_tags.outputs.result }}
tags: |
ghcr.io/${{ env.REGISTRY_IMAGE }}:${{ steps.collect_tags.outputs.result }}
# - name: Update repo description
# # https://github.com/peter-evans/dockerhub-description
# # https://github.com/marketplace/actions/docker-hub-description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -106,10 +115,10 @@ jobs:
# enable-url-completion: true

- name: Delete untagged containers from GitHub Container Registry
# https://github.com/Chizkiyahu/delete-untagged-ghcr-action
# https://github.com/marketplace/actions/delete-untagged-ghcr
uses: Chizkiyahu/delete-untagged-ghcr-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GH_PACKAGES }}
untagged_only: true
owner_type: org
except_untagged_multiplatform: true
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
# https://github.com/actions/checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
persist-credentials: false

- name: Build and push
# https://github.com/docker/build-push-action
# https://github.com/marketplace/actions/build-and-push-docker-images
uses: docker/build-push-action@v5
with:
context: ./images/${{ matrix.image }}
Expand Down

0 comments on commit 790d88a

Please sign in to comment.