Create and push dockerfiles #1
Workflow file for this run
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 and push dockerfiles | |
on: | |
release: | |
types: [published] | |
jobs: | |
latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Delete existing latest tag (if exists) | |
run: | | |
git push --delete origin latest || true | |
git tag -d latest || true | |
- name: Tag Latest Release | |
run: | | |
# Get the latest release tag | |
latest_tag=$(git describe --tags --abbrev=0) | |
# Get the commit hash of the latest release | |
latest_commit=$(git rev-list -n 1 $latest_tag) | |
# Create a new tag based on the latest commit | |
git tag -a latest -m "Latest release" $latest_commit | |
# Push the new tag to the repository | |
git push origin latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker Images Build | |
run: | | |
mvn docker:build -pl agent | |
mvn docker:build -pl flink | |
mvn docker:build -pl hbase/hbase-docker | |
mvn verify spring-boot:build-image -DskipTests=true -pl batch | |
mvn verify spring-boot:build-image -DskipTests=true -pl collector | |
mvn verify spring-boot:build-image -DskipTests=true -pl web | |
mvn verify spring-boot:build-image -DskipTests=true -pl metric-module/collector-starter | |
mvn verify spring-boot:build-image -DskipTests=true -pl metric-module/web-starter | |
docker images | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.docker_username }} | |
password: ${{ secrets.docker_token }} | |
- name: Push to Docker Hub | |
run: | | |
docker push --all-tags galam/pinpoint-agent | |
docker push --all-tags galam/pinpoint-flink | |
docker push --all-tags galam/pinpoint-docker | |
docker push --all-tags galam/pinpoint-batch | |
docker push --all-tags galam/pinpoint-collector | |
docker push --all-tags galam/pinpoint-web | |