Skip to content

Commit

Permalink
Update arc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasVitale committed Jan 31, 2024
1 parent 895fbfb commit 5d2de96
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/arc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,36 @@ on:
jobs:
Explore-GitHub-Actions:
runs-on: arc-runner-set
permissions:
contents: read
packages: write
steps:
- run: echo "🎉 This job uses runner scale set runners!"
- run: echo "🎉 This job uses runner scale set runners!"

- name: Check out source code
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Compile and test
run: ./gradlew clean build

- name: Package as OCI image
run: ./gradlew bootBuildImage --imageName ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}

- name: Authenticate with the container registry
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}

- name: Publish OCI image
run: |
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

0 comments on commit 5d2de96

Please sign in to comment.