use feature based caches and update metrics #147
Workflow file for this run
This file contains 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 (Static) | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
actions: read | |
security-events: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into GitHub Container Registry | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=tag | |
flavor: | | |
latest=false | |
suffix=-static | |
labels: | | |
org.opencontainers.image.title=xenos (static) | |
org.opencontainers.image.description=Static Integration Test Image | |
org.opencontainers.image.vendor=Scrayos UG (haftungsbeschränkt) | |
org.opencontainers.image.authors=Joshua Dean Küpper <[email protected]>, Paul Wagner <[email protected]> | |
org.opencontainers.image.url=https://github.com/scrayosnet/xenos | |
org.opencontainers.image.documentation=https://github.com/scrayosnet/xenos | |
org.opencontainers.image.source=https://github.com/scrayosnet/xenos | |
org.opencontainers.image.licenses=MIT | |
- name: Build and push Docker image | |
id: build-and-push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile.static | |
push: ${{ github.ref_type == 'tag' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
annotations: ${{ steps.meta.outputs.annotations }} | |
labels: ${{ steps.meta.outputs.labels }} | |
provenance: false | |
sbom: false |