Update docker/login-action action to v3.2.0 #809
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
concurrency: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.6 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.3.0 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5.3.0 | |
with: | |
context: . | |
load: true | |
tags: tenjaa/concourse-github-app-token:${{ github.sha }} | |
- name: Save image | |
run: | | |
docker save tenjaa/concourse-github-app-token:${{ github.sha }} > concourse-github-app-token.tar | |
- name: Pass image to next job | |
uses: actions/upload-artifact@v4.3.1 | |
with: | |
name: image | |
path: concourse-github-app-token.tar | |
e2e: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.6 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: image | |
- run: | | |
docker load < concourse-github-app-token.tar | |
- name: test | |
run: ./e2e.sh | |
env: | |
APP_ID: ${{ secrets.app_id }} | |
INSTALLATION_ID: ${{ secrets.installation_id }} | |
PRIVATE_KEY: ${{ secrets.private_key }} | |
release: | |
needs: [e2e] | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: image | |
- run: | | |
docker load < concourse-github-app-token.tar | |
- uses: docker/login-action@v3.2.0 | |
with: | |
username: tenjaa | |
password: ${{ secrets.docker_password }} | |
- name: Login to Public ECR | |
uses: docker/login-action@v3.2.0 | |
with: | |
registry: public.ecr.aws | |
username: ${{ secrets.ECR_ACCESS_KEY_ID }} | |
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3.2.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update latest tag | |
run: | | |
docker tag tenjaa/concourse-github-app-token:${GITHUB_SHA} tenjaa/concourse-github-app-token:latest | |
docker tag tenjaa/concourse-github-app-token:${GITHUB_SHA} public.ecr.aws/f1s7y4s6/concourse-github-app-token:latest | |
docker tag tenjaa/concourse-github-app-token:${GITHUB_SHA} ghcr.io/tenjaa/concourse-github-app-token:latest | |
docker push tenjaa/concourse-github-app-token:latest | |
docker push public.ecr.aws/f1s7y4s6/concourse-github-app-token:latest | |
docker push ghcr.io/tenjaa/concourse-github-app-token:latest |