Skip to content

Commit

Permalink
chore: update pipeline dependencies (#36)
Browse files Browse the repository at this point in the history
* update pipeline dependencies

* remove nelonoel/[email protected]

* add island-is/branch-name@v1

* add island-is/branch-name@v1

* remove island-is/branch-name@v1 add one liner

* change based on PR / branch for getting BRANCH_NAME

* simpler way to get branch name
  • Loading branch information
svanaeinars authored Jun 19, 2024
1 parent 0860438 commit 9c7d954
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,42 @@ jobs:
timeout-minutes: 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-cache-v2-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-cache-v2
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: "${{ env.DOCKER_REGISTRY }}/dss:${{ github.sha }},${{ env.DOCKER_REGISTRY }}/dss:latest"
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- uses: nelonoel/[email protected]
- name: Get Branch Name
run: echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Print Branch Name
run: echo "Branch name is $BRANCH_NAME"
- name: Trigger Deployment for service
# if: github.ref == 'refs/heads/main'
env:
Expand Down

0 comments on commit 9c7d954

Please sign in to comment.