1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2025-01-06 03:03:49 +02:00

Use secrets properly

This commit is contained in:
Sandro Jäckel 2021-01-26 19:57:15 +01:00
parent 2856c1cf76
commit a10642d3eb
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 9 additions and 3 deletions

View File

@ -13,6 +13,6 @@ jobs:
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2.4.1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: peterevans/dockerhub-description

View File

@ -16,6 +16,8 @@ jobs:
uses: actions/checkout@v2
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
VERSION_SHORT: ${{ matrix.version }}
run: |
./build.sh ${{ matrix.version }}
@ -27,6 +29,8 @@ jobs:
uses: actions/checkout@v2
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
EXTRA_TAG: stable
VERSION_SHORT: 1.0
run: |
@ -39,6 +43,8 @@ jobs:
uses: actions/checkout@v2
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
EXTRA_TAG: latest
VERSION_SHORT: 1.1
run: |

View File

@ -50,7 +50,7 @@ else
fi
# Travis gets rate limited by Docker HUB.
if [[ ${CI:-} == true && -n $DOCKER_PASSWORD && -n $DOCKER_USERNAME ]]; then
if [[ ${CI:-} == true && -n ${DOCKER_PASSWORD:-} && -n ${DOCKER_USERNAME:-} ]]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi