Fix versioning #4
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: Build | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
paths-ignore: | |
- 'bumpver.toml' | |
jobs: | |
build: | |
name: build, lint, and test hysds-integration | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get version | |
id: version | |
run: echo version=$(cat version.txt) >> $GITHUB_OUTPUT | |
# -- Build -- | |
- name: Build | |
run: docker build -t "ghcr.io/podaac/ngap-dit-proxy:${{ steps.version.outputs.version }}" . | |
- name: Tag as latest | |
if: github.ref == 'refs/heads/main' | |
run: docker tag ghcr.io/podaac/ngap-dit-proxy:${{ steps.version.outputs.version }} ghcr.io/podaac/ngap-dit-proxy:latest | |
- name: Publish Docker images | |
run: docker image push -a ghcr.io/podaac/ngap-dit-proxy |