Only build docker/electron packages on stable (#2930)
* Only build docker/electron packages on stable * Docker script cleanup
This commit is contained in:
parent
e879668d7d
commit
cd0f271fa3
4
.github/workflows/push-master.yml
vendored
4
.github/workflows/push-master.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
# only run on "CI skip", i.e. when the actual version has been bumped to release/stable
|
||||
docker:
|
||||
name: docker
|
||||
if: "startsWith(github.event.head_commit.message, '[CI Skip] release/') && github.repository == 'polkadot-js/apps'"
|
||||
if: "startsWith(github.event.head_commit.message, '[CI Skip] release/stable') && github.repository == 'polkadot-js/apps'"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@ -50,7 +50,7 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "startsWith(github.event.head_commit.message, '[CI Skip] release/') && github.repository == 'polkadot-js/apps'"
|
||||
if: "startsWith(github.event.head_commit.message, '[CI Skip] release/stable') && github.repository == 'polkadot-js/apps'"
|
||||
name: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@ -18,25 +18,16 @@ VERSION=$(cat package.json \
|
||||
| sed 's/[",]//g' \
|
||||
| sed 's/ //g')
|
||||
|
||||
# helper function for the build logic
|
||||
function build () {
|
||||
echo "*** Building $NAME"
|
||||
docker build -t $NAME .
|
||||
}
|
||||
echo "*** Building $NAME"
|
||||
docker build -t $NAME .
|
||||
|
||||
# helper function for the publishing logic
|
||||
function publish () {
|
||||
docker login -u $REPO -p $DOCKER_PASS
|
||||
docker login -u $REPO -p $DOCKER_PASS
|
||||
|
||||
echo "*** Tagging $REPO/$NAME"
|
||||
if [[ $VERSION != *"beta"* ]]; then
|
||||
docker tag $NAME $REPO/$NAME:$VERSION
|
||||
fi
|
||||
docker tag $NAME $REPO/$NAME
|
||||
echo "*** Tagging $REPO/$NAME"
|
||||
if [[ $VERSION != *"beta"* ]]; then
|
||||
docker tag $NAME $REPO/$NAME:$VERSION
|
||||
fi
|
||||
docker tag $NAME $REPO/$NAME
|
||||
|
||||
echo "*** Publishing $NAME"
|
||||
docker push $REPO/$NAME
|
||||
}
|
||||
|
||||
build
|
||||
publish
|
||||
echo "*** Publishing $NAME"
|
||||
docker push $REPO/$NAME
|
||||
|
||||
Loading…
Reference in New Issue
Block a user