-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from kahootali/remove-deprecated-steps
remove deprecated steps and update pipeline versions
- Loading branch information
Showing
2 changed files
with
13 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,17 +49,15 @@ jobs: | |
IMAGE_ID=$IMAGE_NAME:$IMAGE_TAG | ||
IMAGE_REPO=$REGISTRY/$IMAGE_ID | ||
echo "Image: $IMAGE_REPO" | ||
echo "::set-output name=image::$IMAGE_REPO" | ||
echo "::set-output name=image_name::$IMAGE_NAME" | ||
echo REPO=$IMAGE_NAME >> $GITHUB_ENV | ||
echo IMAGE=$(echo "$REGISTRY/$IMAGE_ID") >> $GITHUB_ENV | ||
echo "image=$IMAGE_REPO" >>$GITHUB_OUTPUT | ||
echo "image_name=$IMAGE_NAME" >>$GITHUB_OUTPUT | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
@@ -68,17 +66,15 @@ jobs: | |
run: | | ||
echo "Image from Output: ${{ steps.generate_vars.outputs.image }}" | ||
echo "Repo from Output: ${{ steps.generate_vars.outputs.image_name }}" | ||
echo "Image from Env: ${{ env.IMAGE }}" | ||
echo "Repo from Env: ${{ env.REPO }}" | ||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
pull: true | ||
push: true | ||
tags: ${{ env.IMAGE }} | ||
tags: ${{ steps.generate_vars.outputs.image }} | ||
|
||
- name: Push tag | ||
uses: anothrNick/[email protected] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
go build -v . | ||
- name: Initialize Pipeline | ||
uses: mshick/add-pr-comment@v2 | ||
uses: mshick/add-pr-comment@v2.8.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
|
@@ -47,17 +47,15 @@ jobs: | |
IMAGE_ID=$IMAGE_NAME:$IMAGE_TAG | ||
IMAGE_REPO=$REGISTRY/$IMAGE_ID | ||
echo "Image: $IMAGE_REPO" | ||
echo "::set-output name=image::$IMAGE_REPO" | ||
echo "::set-output name=image_name::$IMAGE_NAME" | ||
echo REPO=$IMAGE_NAME >> $GITHUB_ENV | ||
echo IMAGE=$(echo "$REGISTRY/$IMAGE_ID") >> $GITHUB_ENV | ||
echo "image=$IMAGE_REPO" >>$GITHUB_OUTPUT | ||
echo "image_name=$IMAGE_NAME" >>$GITHUB_OUTPUT | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
@@ -66,29 +64,27 @@ jobs: | |
run: | | ||
echo "Image from Output: ${{ steps.generate_vars.outputs.image }}" | ||
echo "Repo from Output: ${{ steps.generate_vars.outputs.image_name }}" | ||
echo "Image from Env: ${{ env.IMAGE }}" | ||
echo "Repo from Env: ${{ env.REPO }}" | ||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
pull: true | ||
push: true | ||
tags: ${{ env.IMAGE }} | ||
tags: ${{ steps.generate_vars.outputs.image }} | ||
|
||
- name: Comment on PR | ||
uses: mshick/add-pr-comment@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
message: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.IMAGE }}`' | ||
message: '@${{ github.actor }} Image is available for testing. `docker pull ${{ steps.generate_vars.outputs.image }}`' | ||
allow-repeats: false | ||
|
||
- name: Notify Failure | ||
if: failure() | ||
uses: mshick/add-pr-comment@v1 | ||
uses: mshick/add-pr-comment@v2.8.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
|