Skip to content

Commit

Permalink
ci: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
schuer committed Dec 16, 2023
1 parent 7cf2921 commit 4edac2d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
token: ${{ secrets.GH_WORKFLOW }}

- name: Setup Deno
# https://github.com/denoland/setup-deno
uses: denoland/setup-deno@v1
with:
deno-version: "^1"
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:

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

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

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

# - name: Login to Docker Hub
# # https://github.com/docker/login-action
# 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
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 }}
cache-from: type=gha
cache-to: type=gha,mode=max
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: Update repo description
# # https://github.com/peter-evans/dockerhub-description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# repository: ${{ github.repository }}
# short-description: ${{ github.event.repository.description }}
# enable-url-completion: true

- name: Delete untagged containers from GitHub Container Registry
# https://github.com/Chizkiyahu/delete-untagged-ghcr-action
uses: Chizkiyahu/delete-untagged-ghcr-action@v3
with:
token: ${{ secrets.PAT_TOKEN }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
untagged_only: true
owner_type: org
except_untagged_multiplatform: true
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

steps:
- name: Checkout repository
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false
Expand Down Expand Up @@ -48,9 +49,12 @@ jobs:
with:
persist-credentials: false

- name: Build
- name: Build and push
# https://github.com/docker/build-push-action
uses: docker/build-push-action@v5
with:
context: ./images/${{ matrix.image }}
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
tags: ${{ matrix.image }}

0 comments on commit 4edac2d

Please sign in to comment.