Skip to content

Commit

Permalink
build-push-update action for l0_gcs_loader
Browse files Browse the repository at this point in the history
  • Loading branch information
covesturtevant committed Nov 20, 2024
1 parent c1d7655 commit 418d87b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build_push_update_l0_gcs_loader.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Build-push-update_l0_gcs_loader"

on:
push:
tags:
- "l0_gcs_loader/v*.*.*"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use github and google registries
GHCR_REGISTRY: ghcr.io
GCP_ARTIFACT_HOST: ${{ vars.SHARED_WIF_LOCATON }}-docker.pkg.dev
GCP_REGISTRY: ${{ vars.SHARED_WIF_LOCATON }}-docker.pkg.dev/${{ vars.SHARED_WIF_PROJECT }}/${{ vars.SHARED_WIF_REPO }}
GCP_PROVIDER: ${{ vars.SHARED_WIF_PROVIDER }}
GCP_SERVICE_ACCOUNT: ${{ vars.SHARED_WIF_SERVICE_ACCOUNT }}
GHCR_NS: battelleecology
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
# IMAGE_NAME: ${{ github.repository }}
# Get just the repo name from the event, i.e., NEON-IS-data-processing
REPO_NAME: ${{ github.event.repository.name }}
# IS module name
MODULE_PATH: ./modules/l0_gcs_loader
IMAGE_NAME: neon-is-l0-gcs-loader

jobs:
build-push-update:
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
pull-requests: 'write'

steps:
- name: "Checkout"
uses: "actions/[email protected]"
with:
ref: 'master'
fetch-depth: '0'

- name: Get short SHA
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Get semver
run: echo "semver=$(git describe --tags --abbrev=0 --match=l0_gcs_loader/v*.*.* | awk -F "/" '{print $2}')" >> $GITHUB_ENV

- name: Build push and update
uses: ./.github/actions/build-push-update

0 comments on commit 418d87b

Please sign in to comment.