Skip to content

Commit

Permalink
Pinned Github action images
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Aug 21, 2024
1 parent 01a0e55 commit 1297787
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
uses: shimataro/ssh-key-action@v2.7.0
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docker-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3.2.0
with:
platforms: 'arm64,arm'

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3.6.1
with:
platforms: linux/arm64,linux/amd64,linux/arm/v7

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v5.5.1
with:
images: |
${{ github.repository }}
Expand All @@ -45,7 +45,7 @@ jobs:
type=raw,value=latest,enable=true
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6.7.0
with:
context: .
platforms: ${{ steps.buildx.outputs.platforms }}
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@ jobs:
patch: ${{ steps.release.outputs.patch }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4.1.3
id: release
with:
release-type: node
package-name: ${{vars.PACKAGE_NAME}}
pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
prerelease: true

# The logic below handles the npm publication:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4.0.3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
Expand All @@ -46,34 +43,34 @@ jobs:
steps:
- run: echo version v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}

- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3.2.0
with:
platforms: 'arm64,arm'

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v3.6.1
with:
platforms: linux/arm64,linux/amd64,linux/arm/v7

- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6.7.0
with:
context: .
platforms: ${{ steps.buildx.outputs.platforms }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ matrix.node }}
- run: npm install
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} node:lts-alpine
FROM --platform=${BUILDPLATFORM} node:20.16.0
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down

0 comments on commit 1297787

Please sign in to comment.