Merge pull request #1642 from paketo-buildpacks/arm64-foojay #52
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
name: Create Action alibaba-dragonwell-dependency | |
"on": | |
pull_request: | |
paths: | |
- actions/* | |
- actions/alibaba-dragonwell-dependency/* | |
push: | |
branches: | |
- main | |
paths: | |
- actions/* | |
- actions/alibaba-dragonwell-dependency/* | |
release: | |
types: | |
- published | |
jobs: | |
create-action: | |
name: Create Action | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- name: Docker login ghcr.io | |
if: ${{ (github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork) && (github.actor != 'dependabot[bot]') }} | |
uses: docker/login-action@v3 | |
with: | |
password: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | |
registry: ghcr.io | |
username: ${{ secrets.JAVA_GITHUB_USERNAME }} | |
- uses: actions/checkout@v4 | |
- name: Create Action | |
run: | | |
#!/usr/bin/env bash | |
set -euo pipefail | |
echo "::group::Building ${TARGET}:${VERSION}" | |
docker build \ | |
--file actions/Dockerfile \ | |
--build-arg "SOURCE=${SOURCE}" \ | |
--tag "${TARGET}:${VERSION}" \ | |
. | |
echo "::endgroup::" | |
if [[ "${PUSH}" == "true" ]]; then | |
echo "::group::Pushing ${TARGET}:${VERSION}" | |
docker push "${TARGET}:${VERSION}" | |
echo "::endgroup::" | |
else | |
echo "Skipping push" | |
fi | |
env: | |
PUSH: ${{ github.event_name != 'pull_request' }} | |
SOURCE: alibaba-dragonwell-dependency | |
TARGET: ghcr.io/paketo-buildpacks/actions/alibaba-dragonwell-dependency | |
VERSION: main |