Skip to content

Commit

Permalink
feat: upgraded git actions to be compatible with node 20 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba authored Apr 2, 2024
1 parent a9caff0 commit 34cea99
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 87 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install asdf
uses: asdf-vm/actions/setup@v1
uses: asdf-vm/actions/setup@v3
- name: Cache tools
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
/home/runner/.asdf
Expand All @@ -30,7 +30,7 @@ jobs:
commitlint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
36 changes: 18 additions & 18 deletions .github/workflows/publish-devhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
branches: [dev]
paths:
- "wiki/**"
- "mkdocs.yml"
- "catalog-info.yaml"
- ".github/workflows/publish-devhub.yml"
- 'wiki/**'
- 'mkdocs.yml'
- 'catalog-info.yaml'
- '.github/workflows/publish-devhub.yml'

jobs:
publish-techdocs-site:
Expand All @@ -26,10 +26,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-python@v4
- uses: actions/setup-node@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'

Expand All @@ -49,20 +49,20 @@ jobs:
- name: Publish docs to dev bucket
# Always publish the docs to the dev bucket
run: |
techdocs-cli publish --publisher-type awsS3 \
--storage-name $TECHDOCS_S3_BUCKET_NAME \
--entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \
--awsEndpoint $AWS_ENDPOINT \
--awsS3ForcePathStyle true \
--awsBucketRootPath $TECHDOCS_S3_DEV_ROOT_PATH
techdocs-cli publish --publisher-type awsS3 \
--storage-name $TECHDOCS_S3_BUCKET_NAME \
--entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \
--awsEndpoint $AWS_ENDPOINT \
--awsS3ForcePathStyle true \
--awsBucketRootPath $TECHDOCS_S3_DEV_ROOT_PATH
- name: Publish docs to prod bucket
# Currently syncing the prod/dev publish for our docs similar to the wiki updates.
# Separate this out to a different ref to deploy prod on a specific branch only (e.g main).
if: ${{ github.ref == 'refs/heads/dev' }}
run: |
techdocs-cli publish --publisher-type awsS3 \
--storage-name $TECHDOCS_S3_BUCKET_NAME \
--entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \
--awsEndpoint $AWS_ENDPOINT \
--awsS3ForcePathStyle true \
techdocs-cli publish --publisher-type awsS3 \
--storage-name $TECHDOCS_S3_BUCKET_NAME \
--entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME \
--awsEndpoint $AWS_ENDPOINT \
--awsS3ForcePathStyle true \
10 changes: 5 additions & 5 deletions .github/workflows/publish-image-backup-storage-gold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
workflow_dispatch:
inputs:
postgres_version:
description: "The postgres version"
description: 'The postgres version'
required: true
options: ["12", "13"]
options: ['12', '13']

env:
GITHUB_REGISTRY: ghcr.io
Expand All @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout the sso-repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Checkout backup storage repository
run: git clone https://github.com/BCDevOps/backup-container.git
Expand All @@ -32,14 +32,14 @@ jobs:
run: cp ./docker/backup-container/* ./backup-container/docker

- name: Log in to the GitHub Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: backup-container/docker
push: true
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/publish-image-backup-storage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout the sso-repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Checkout backup storage repository
run: git clone https://github.com/BCDevOps/backup-container.git
Expand All @@ -32,30 +32,30 @@ jobs:
run: cp ./docker/backup-container/Dockerfile ./backup-container/docker/Dockerfile

- name: Log in to the GitHub Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
# with:
# images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}

# - name: Print tags
# run: echo ${{ steps.meta.outputs.tags }}
# - name: Print tags
# run: echo ${{ steps.meta.outputs.tags }}

# - name: Print labels
# run: echo ${{ steps.meta.outputs.labels }}
# - name: Print labels
# run: echo ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: backup-container/docker
push: true
tags: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:postgres-${{ github.event.inputs.postgres_version}}
# tags: ${{ steps.meta.outputs.tags }}
# labels: postgres-${{ github.event.inputs.postgres_version}}
# tags: ${{ steps.meta.outputs.tags }}
# labels: postgres-${{ github.event.inputs.postgres_version}}
labels: sso-keycloak-backup
10 changes: 5 additions & 5 deletions .github/workflows/publish-image-backup-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
- main
- dev
tags:
- "*"
- '*'
paths:
- ".github/workflows/publish-image-backup-storage.yml"
- '.github/workflows/publish-image-backup-storage.yml'

env:
GITHUB_REGISTRY: ghcr.io
Expand All @@ -27,20 +27,20 @@ jobs:
run: git clone https://github.com/BCDevOps/backup-container.git

- name: Log in to the GitHub Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: backup-container/docker
push: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-image-kc-cron-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- main
- dev
tags:
- "*"
- '*'
paths:
- "docker/kc-cron-job/**"
- ".github/workflows/publish-image-kc-cron-job.yml"
- 'docker/kc-cron-job/**'
- '.github/workflows/publish-image-kc-cron-job.yml'

env:
GITHUB_REGISTRY: ghcr.io
Expand All @@ -24,23 +24,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the GitHub Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: docker/kc-cron-job
push: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-image-keycloak-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the REDHAT Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REDHAT_REGISTRY }}
username: ${{ secrets.REDHAT_USERNAME }}
password: ${{ secrets.REDHAT_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: docker/keycloak
push: true
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish-image-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create and publish Keycloak Docker image
on:
push:
tags:
- "*"
- '*'

env:
GITHUB_REGISTRY: ghcr.io
Expand All @@ -19,25 +19,25 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the REDHAT Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REDHAT_REGISTRY }}
username: ${{ secrets.REDHAT_USERNAME }}
password: ${{ secrets.REDHAT_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -47,18 +47,18 @@ jobs:
type=sha,format=long
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: docker/keycloak
push: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-image-maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-mt-cache
key: ${{ runner.os }}-buildx-mt-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-mt-

- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: docker/maintenance-page
push: true
Expand Down
Loading

0 comments on commit 34cea99

Please sign in to comment.