Skip to content

Commit

Permalink
test build and push action
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaconsalvi committed Aug 16, 2024
1 parent 421b927 commit 9ba19b1
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/build-n-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,22 @@ jobs:
path: |
${{ runner.temp }}/jdk_setup.tar.gz
${{ runner.temp }}/jdk_setup.sha256
#
# RELEASE CANDIDATE - Build Docker image.
#
- name: RELEASE CANDIDATE - Build jar and Docker image
run: |
docker build \
--secret id=my_user,src=${{ secrets.GIT_USER }} \
-f src/main/docker/Dockerfile.multistage \
-t ghcr.io/${{ github.repository }}:${{ github.head_ref || github.ref_name }} \
.
#
# RELEASE CANDIDATE - Push Docker image.
#
- name: RELEASE CANDIDATE - Push Docker image
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push -a ghcr.io/${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
file: src/main/docker/Dockerfile.multistage
tags: ghcr.io/${{ github.repository }}:${{ github.head_ref || github.ref_name }}

#
# Install Node.
#
Expand Down

0 comments on commit 9ba19b1

Please sign in to comment.