Skip to content

Commit

Permalink
Merge pull request #1 from Over-haul/testing-amazon-ecr-login
Browse files Browse the repository at this point in the history
[GitHub Actions] Replacing deprecated set-output with new `$GITHUB_OUTPUT`
  • Loading branch information
ricardo-overhaul authored Dec 12, 2022
2 parents 7f93bdf + 18028ae commit 86f8859
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- name: Get repo name
id: repoName
run: echo "::set-output name=reponame::$(echo ${{github.repository}} | cut -d '/' -f 2)"
run: echo "REPONAME=$(echo ${{github.repository}} | cut -d '/' -f 2)" >> $GITHUB_OUTPUT
- name: Get the version
id: get-version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
Expand All @@ -28,11 +28,24 @@ jobs:
role-to-assume: arn:aws:iam::645843940509:role/github-actions-ecr-public-create-read-write
role-duration-seconds: 900 # Member must have value greater than or equal to 900
aws-region: us-east-1
# Using this until https://github.com/aws-actions/amazon-ecr-login/issues/116
# is closed
- name: Build and Push to ECR public
id: build-and-push
uses: pahud/ecr-public-action@0db8adbcfd3c3ec2f604d70fdd6b5d15c80e1dbc
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: 'public'
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: |
public.ecr.aws/e5r9m0c5/${{ steps.repoName.outputs.reponame }}:${{ steps.get-version.outputs.VERSION }}
public.ecr.aws/e5r9m0c5/${{ steps.repoName.outputs.REPONAME }}:${{ steps.get-version.outputs.VERSION }}
- name: Check bash and homebrew
id: check-bash-brew
run: |
docker run --rm public.ecr.aws/e5r9m0c5/${{ steps.repoName.outputs.REPONAME }}:${{ steps.get-version.outputs.VERSION }} \
echo "${BASH_VERSION}"; \
brew doctor
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal-20220531
FROM ubuntu:jammy-20221130

ENV DEBIAN_FRONTEND=noninteractive

Expand Down

0 comments on commit 86f8859

Please sign in to comment.