Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Fix push to dockerhub (#1)
Browse files Browse the repository at this point in the history
* RELEASE=20a MAJOR=20 MINOR=1 PATCH=0

* RELEASE=20a MAJOR=20 MINOR=1 PATCH=0

* [skip ci]
  • Loading branch information
SPTKL authored Feb 27, 2020
1 parent b6df32b commit 5e12ca7
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/dockerpush.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Create geosupport docker image
on: [push]
jobs:
skip:
name: Build and test
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
push:
needs: skip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log into registry
- name: Log into Github registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build image
shell: bash
Expand All @@ -20,5 +27,23 @@ jobs:
--build-arg PATCH=$PATCH \
--tag docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:${VERSION} .
docker push docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:${VERSION}
docker tag docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:${VERSION} docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:latest
- name: Push image
shell: bash
run: |
export $(echo '${{ github.event.head_commit.message }}' | sed 's/#.*//g' | xargs)
export VERSION=$MAJOR.$MINOR.$PATCH
docker tag docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:${VERSION} \
docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:latest
docker push docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:latest
- name: Log into Docker registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
- name: Update Dockerhub
shell: bash
run: |
export $(echo '${{ github.event.head_commit.message }}' | sed 's/#.*//g' | xargs)
export VERSION=$MAJOR.$MINOR.$PATCH
docker tag docker.pkg.github.com/nycplanning/docker-geosupport/geosupport:${VERSION} \
sptkl/docker-geosupport:${VERSION}
docker push sptkl/docker-geosupport:${VERSION}
docker tag sptkl/docker-geosupport:${VERSION} sptkl/docker-geosupport:latest
docker push sptkl/docker-geosupport:latest

0 comments on commit 5e12ca7

Please sign in to comment.