diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..88972e26 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build docker image +on: + push: + branches: ["master"] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: docker/setup-buildx-action@v2 + + - uses: docker/login-action@v2 + with: + registry: "ghcr.io" + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: docker/metadata-action@v4 + id: meta + with: + images: "ghcr.io/vimeda/helm" + tags: | + ${{ github.sha }} + latest + + - uses: actions/checkout@v3 + + - uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/action.yml b/action.yml index 5321e9df..afd6124b 100644 --- a/action.yml +++ b/action.yml @@ -66,4 +66,4 @@ inputs: required: false runs: using: docker - image: Dockerfile + image: docker://ghcr.io/vimeda/helm