Merge pull request #34 from jkoelker/renovate/g.yxqyang.asia-prometheus-c… #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Docker Build and Push | |
"on": | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
# yamllint disable-line rule:line-length rule:comments | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Log in to Container Registry | |
# yamllint disable-line rule:line-length rule:comments | |
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata | |
id: meta | |
# yamllint disable-line rule:line-length rule:comments | |
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5 | |
with: | |
images: ghcr.io/jkoelker/schwab-proxy | |
tags: | | |
type=ref,event=tag | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=semver,pattern={{version}} | |
- name: Build and push Docker image | |
# yamllint disable-line rule:line-length rule:comments | |
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |