Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Docker パッケージの作成 CI の修正 #710

Merged
merged 4 commits into from
Feb 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ inputs:
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
approvers/oreorebot2
ghcr.io/approvers/oreorebot2
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -26,15 +45,13 @@ runs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: |
approvers/oreorebot2:latest
approvers/oreorebot2:${{ inputs.sha }}
approvers/oreorebot2:v${{ inputs.major }}
approvers/oreorebot2:v${{ inputs.major }}.${{ inputs.minor }}
approvers/oreorebot2:v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max