Archived
1
0

chore: update Docker image publish workflow (#4847)

* Use official action to log in to Docker Hub
* Run using pinned ubuntu-20.04 environment
This commit is contained in:
Jonathan Yu 2022-02-10 17:40:41 -08:00 committed by GitHub
parent 177f0ed163
commit 8135d2ecc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -6,13 +6,15 @@ on:
workflow_dispatch: workflow_dispatch:
release: release:
types: [released] types:
- released
jobs: jobs:
docker-images: docker-images:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
@ -20,9 +22,13 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run ./ci/steps/docker-buildx-push.sh - name: Run ./ci/steps/docker-buildx-push.sh
run: ./ci/steps/docker-buildx-push.sh run: ./ci/steps/docker-buildx-push.sh
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ github.token }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

View File

@ -26,11 +26,6 @@ main() {
# Download the release-packages artifact # Download the release-packages artifact
download_artifact release-packages ./release-packages download_artifact release-packages ./release-packages
# Login to Docker
if [[ ${CI-} ]]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi
docker buildx bake -f ci/release-image/docker-bake.hcl --push docker buildx bake -f ci/release-image/docker-bake.hcl --push
} }