diff --git a/.github/workflows/docker-image.v2.yml b/.github/workflows/docker-image.v2.yml index edcdd60..9001650 100644 --- a/.github/workflows/docker-image.v2.yml +++ b/.github/workflows/docker-image.v2.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Docker Buildx id: buildx @@ -70,11 +70,13 @@ jobs: docker tag $CLAIR_LOCAL_SCAN_IMAGE ${CLAIR_LOCAL_SCAN_IMAGE}:${CLAIR_VERSION}_${GITHUB_SHA} docker images - name: Login to DockerHub - uses: docker/login-action@v1 + if: github.repository_owner == 'arminc' + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push images + if: github.repository_owner == 'arminc' run: | docker push ${CLAIR_LOCAL_SCAN_IMAGE}:${CLAIR_VERSION}_${GITHUB_SHA} docker push $CLAIR_LOCAL_SCAN_IMAGE:latest diff --git a/.github/workflows/docker-image.v4.yml b/.github/workflows/docker-image.v4.yml index 8f8a1cb..1f72c1d 100644 --- a/.github/workflows/docker-image.v4.yml +++ b/.github/workflows/docker-image.v4.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Runner diskspace workaround run: | @@ -88,11 +88,13 @@ jobs: docker tag $CLAIR_LOCAL_SCAN_IMAGE ${CLAIR_LOCAL_SCAN_IMAGE}:${CLAIR_VERSION}_${GITHUB_SHA} docker images - name: Login to DockerHub - uses: docker/login-action@v1 + if: github.repository_owner == 'arminc' + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push images + if: github.repository_owner == 'arminc' run: | docker push ${CLAIR_LOCAL_SCAN_IMAGE}:${CLAIR_VERSION}_${GITHUB_SHA} docker push $CLAIR_LOCAL_SCAN_IMAGE:latest