Skip to content

Commit 3011d85

Browse files
authored
change: get github-actions to publish docker image to ghcr.io (#57)
* fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker github action * fix: docker build github action * fix: docker build github action * fix: docker build github action * fix: docker build github action * fix: docker build github action * chore: run github action in main branch
1 parent 3657c26 commit 3011d85

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/dockerbuild.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
env:
1010
REGISTRY: ghcr.io
11-
software_version: 0.0.1
1211
jobs:
1312
docker:
1413
runs-on: ubuntu-latest
@@ -28,12 +27,18 @@ jobs:
2827
-
2928
name: Set up Docker Buildx
3029
uses: docker/setup-buildx-action@v2
30+
with:
31+
buildkitd-flags: --debug
3132
-
3233
name: Login to DockerHub
3334
uses: docker/login-action@v2
3435
with:
35-
username: ${{ secrets.DOCKERHUB_USERNAME }}
36-
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
# with:
40+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
3742
-
3843
name: Set up Docker Buildx
3944
id: buildx
@@ -49,12 +54,12 @@ jobs:
4954
5055
-
5156
name: Build and push
52-
uses: docker/build-push-action@v2
57+
uses: docker/build-push-action@v3
5358
with:
5459
builder: ${{ steps.buildx.outputs.name }}
5560
cache-from: type=local,src=/tmp/.buildx-cache
5661
cache-to: type=local,dest=/tmp/.buildx-cache
5762
context: "{{defaultContext}}"
5863
file: "docker/Dockerfile_download_granules.public"
5964
push: true
60-
tags: "waiphyojpl/uds1:${{ env.software_version }}"
65+
tags: "${{ env.REGISTRY }}/unity-sds/unity-data-services:${{ env.software_version }}"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- Added lambda for parsing metadata from Sounder SIPS L0 metadata files [#14](https://github.com/unity-sds/unity-data-services/issues/14)
12+
13+
### Fixed
14+
- Pushed docker image to ghcr.io

ci.cd/store_version.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
software_version=`python3 ${GITHUB_WORKSPACE}/setup.py --version`
3+
echo $software_version
4+
echo "software_version=${software_version}" >> ${GITHUB_ENV}

0 commit comments

Comments
 (0)