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