From 3e0214cde3cb796822c8a8bea2ead2bb822a9f4b Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Mon, 24 Jul 2023 21:37:06 -0400 Subject: [PATCH] update actions --- .github/workflows/main.yml | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 737a19a..31ebf80 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Show environment run: env @@ -40,7 +40,7 @@ jobs: echo "AppEnv=${APP_ENV}" >> $GITHUB_OUTPUT - name: Build docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . load: true @@ -58,7 +58,7 @@ jobs: - name: Configure AWS credentials (SIL) id: aws_sil - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.SIL__AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.SIL__AWS_SECRET_ACCESS_KEY }} @@ -71,7 +71,7 @@ jobs: registries: ${{ secrets.SIL__AWS_ECR_ACCOUNT }} - name: Push to AWS ECR (SIL) - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -82,7 +82,7 @@ jobs: - name: Configure AWS credentials (FCBH) if: ${{ steps.meta.outputs.AppEnv == 'prd' }} id: aws_fcbh - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.FCBH__AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.FCBH__AWS_SECRET_ACCESS_KEY }} @@ -97,7 +97,7 @@ jobs: - name: Push to AWS ECR (FCBH) if: ${{ steps.meta.outputs.AppEnv == 'prd' }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -105,29 +105,15 @@ jobs: "${{ steps.ecr_fcbh.outputs.registry }}/appbuilder-agent-${{ steps.meta.outputs.AppEnv }}:${{ steps.meta.outputs.DockerTag }}" "${{ steps.ecr_fcbh.outputs.registry }}/appbuilder-agent-${{ steps.meta.outputs.AppEnv }}:${{ steps.version.outputs.VersionTag }}" - # - name: Login to DockerHub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - - # - name: Push to DockerHub - # uses: docker/build-push-action@v2 - # with: - # context: . - # push: true - # tags: | - # "sillsdev/appbuilder-agent-${{ steps.meta.outputs.AppEnv }}:${{ steps.meta.outputs.DockerTag }}" - - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push to GHCR - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -137,7 +123,6 @@ jobs: - name: Cleanup older untagged packages, keep 2 uses: actions/delete-package-versions@v4 with: - context: . package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}" package-type: 'container' min-versions-to-keep: 2 @@ -146,7 +131,6 @@ jobs: - name: Cleanup older all packages, keep 6 uses: actions/delete-package-versions@v4 with: - context: . package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}" package-type: 'container' min-versions-to-keep: 6