Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Build new image with latest amazon/aws-cli:2.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rbfernan committed Jul 27, 2023
1 parent d6a2211 commit b6ea5d2
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build & push image workflow
on:
push:
branches:
- master
pull_request:
branches:
- master

workflow_dispatch:
inputs:
ref:
description: Reference to build image from. `master` will push the `latest` tag.
type: string
required: false
default: master
env:
REGISTRY: ghcr.io # Using GH Packages for hosting public images
IMAGE_NAME: ${{ github.repository }}
LATEST: ${{ inputs == null && github.ref_name == 'master' || inputs.ref == 'master' }}

jobs:
build-push-image:
name: Build & push image
runs-on: eks-runner
timeout-minutes: 10
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v3

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=,suffix=_${{ github.run_number }},format=short
type=raw,value=latest,enable=${{env.LATEST}}
- name: Build and push Docker image
uses: docker/build-push-action@v3.3.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://aws.amazon.com/blogs/developer/aws-cli-v2-docker-image/
# https://hub.docker.com/r/amazon/aws-cli
FROM amazon/aws-cli:2.4.23
FROM amazon/aws-cli:2.13.4

WORKDIR /
ADD ./ /
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branding:
color: 'red'
runs:
using: docker
image: Dockerfile
image: ghcr.io/pipedrive/aws-s3-github-action
inputs:
command:
description: "The command that will be performed. More info: https://docs.aws.amazon.com/cli/latest/reference/s3/#available-commands"
Expand Down

0 comments on commit b6ea5d2

Please sign in to comment.