Skip to content

Commit

Permalink
ci(docker-build-and-push): fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
Kenji Miyake committed Feb 3, 2022
1 parent 23f2405 commit 5de382a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ runs:
sudo apt-get -y install jq
shell: bash

# workflow_dispatch: date
# scheduled: latest, date
# workflow_dispatch: latest, date
# schedule: latest, date
# tag: semver
- name: Set Docker tags
id: set-docker-tags
run: |
tags=()
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
tags+=("latest")
tags+=("{{date 'YYYYMMDD'}}")
else
tags+=("type=schedule,pattern=latest")
Expand Down Expand Up @@ -109,10 +110,3 @@ runs:
bake.json
set: |
*.platform=${{ inputs.platforms }}
- name: Output published tags
if: ${{ github.event_name != 'pull_request' }}
id: output-published-tags
run: |
echo ::set-output name=published-tags::$(jq ".target[].tags[]" < bake.json)
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/update-docker-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
package_full_name=ghcr.io/${{ github.repository_owner }}/${{ env.PACKAGE_NAME }}
url="https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ matrix.package-name }}/versions"
url="https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions"
echo "url: $url"
tags=$(curl -fsSL "$url" -H "Authorization: token ${{ github.token }}" | jq ".[].metadata.container.tags[]" | cut -d '"' -f 2)
Expand Down

0 comments on commit 5de382a

Please sign in to comment.