Skip to content

Commit

Permalink
chore: bump all deps for docker build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeyheath committed Jan 5, 2024
1 parent 6e8d29b commit dab83ec
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
51 changes: 51 additions & 0 deletions .github/actions/dependabot-automerge/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs:
using: "composite"
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Generate token
id: generate_token
uses: chanzuckerberg/[email protected]
with:
app_id: ${{ secrets.CZI_GITHUB_HELPER_APP_ID }}
private_key: ${{ secrets.CZI_GITHUB_HELPER_PK }}
- name: Install gh CLI
shell: bash
env:
VERSION: 2.30.0
run: |
set -ue
set -o pipefail
AMD_URL="https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gz"
ARM_URL="https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_arm64.tar.gz"
PLATFORM=$(uname -m)
if [[ $PLATFORM == "arm64" ]]; then
URL=$ARM_URL
elif [[ $PLATFORM == "aarch64" ]]; then
URL=$ARM_URL
else
URL=$AMD_URL
fi
curl $URL -L -v -o ghcli.tar.gz
mkdir ghcli
tar -xf ghcli.tar.gz -C ghcli --strip-components 1
echo "${PWD}/ghcli/bin" >> "${GITHUB_PATH}"
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ steps.generate_token.outputs.token }}"
- name: Approve a PR
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
13 changes: 6 additions & 7 deletions .github/actions/docker-build-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ outputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ inputs.registry }}/${{ inputs.name }}
tags: |
Expand All @@ -52,15 +51,15 @@ runs:
type=sha,format=long,prefix=sha-
${{ inputs.custom_tag }}
- name: Login to ECR
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
- name: Calculate Branch and Base Names
id: refs
uses: chanzuckerberg/github-actions/.github/actions/[email protected]
- name: Calculate Cache-From
id: cache-from
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
let cacheFrom = [
Expand All @@ -72,7 +71,7 @@ runs:
core.setOutput("cacheFrom", cacheFrom);
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: ${{ inputs.dockerfile }}
context: ${{ inputs.context }}
Expand Down

0 comments on commit dab83ec

Please sign in to comment.