diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-08-13 12:10:24 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-08-13 12:10:24 +0200 |
| commit | ede8ab2d7fb241b677964d393ce7c4cac5006a4d (patch) | |
| tree | 3455c18b6994f46702a94b3595b99a7e9c9fc06c /.github/workflows | |
| parent | ae5b6ad34ce4aca94816e2147774616fb6b7e135 (diff) | |
| download | discordavatarproxy-ede8ab2d7fb241b677964d393ce7c4cac5006a4d.tar.gz discordavatarproxy-ede8ab2d7fb241b677964d393ce7c4cac5006a4d.tar.bz2 discordavatarproxy-ede8ab2d7fb241b677964d393ce7c4cac5006a4d.zip | |
feat: docker publishing
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 19 | ||||
| -rw-r--r-- | .github/workflows/publish.yml | 46 |
2 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..86447dc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: Rust + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ca570c9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +name: Publish Docker Image + +on: + push: + branches: + - master + tags: + - "*" + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE: nea89o/discordavatarproxy + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/metadata-action@v5 + id: meta + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + - uses: docker/login-action@v3 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ${{ env.REGISTRY }} + + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} |
