safer login

This commit is contained in:
jbannon 2022-06-02 05:17:15 +00:00
parent 2781566cb3
commit 3c3f9140f7

View file

@ -46,13 +46,12 @@ jobs:
- name: Build Docker Image - name: Build Docker Image
run: docker build --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" docker/ run: docker build --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" docker/
- name: Log in to registry - name: login to GitHub Container Registry
run: | uses: docker/login-action@v1
if [[ ${{ github.ref }} == 'refs/head/master' ]]; then with:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin registry: ghcr.io
else username: ${{ github.actor }}
echo "Skipped on PRs" password: ${{ secrets.GITHUB_TOKEN }}
fi
- name: Push image - name: Push image
run: | run: |