Browse Source

fix metadata

main
Daniel Gibbs 2 months ago
parent
commit
e09a7b1bb0
  1. 100
      .github/workflows/docker-publish.yml

100
.github/workflows/docker-publish.yml

@ -10,56 +10,56 @@ on:
jobs: jobs:
build-ubuntu-2404: build-ubuntu-2404:
name: Build Ubuntu 24.04 name: Build Ubuntu 24.04
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
packages: write packages: write
contents: read contents: read
attestations: write attestations: write
id-token: write id-token: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 uses: docker/metadata-action@v5
with: with:
images: my-docker-hub-namespace/my-docker-hub-repository images: |
gameservermanagers/steamcmd:latest
- name: Build and push (Ubuntu 24.04) gameservermanagers/steamcmd:ubuntu
uses: docker/build-push-action@v6 gameservermanagers/steamcmd:ubuntu-24.04
with: ghcr.io/gameservermanagers/steamcmd:latest
context: . ghcr.io/gameservermanagers/steamcmd:ubuntu
file: ./Dockerfile.ubuntu-2404 ghcr.io/gameservermanagers/steamcmd:ubuntu-24.04
platforms: linux/amd64
push: true - name: Build and push (Ubuntu 24.04)
tags: | uses: docker/build-push-action@v6
gameservermanagers/steamcmd:latest with:
gameservermanagers/steamcmd:ubuntu context: .
gameservermanagers/steamcmd:ubuntu-24.04 file: ./Dockerfile.ubuntu-2404
ghcr.io/gameservermanagers/steamcmd:latest platforms: linux/amd64
ghcr.io/gameservermanagers/steamcmd:ubuntu push: true
ghcr.io/gameservermanagers/steamcmd:ubuntu-24.04 tags: ${{ steps.meta.outputs.tags }}
build-ubuntu-2204: build-ubuntu-2204:
name: Build Ubuntu 22.04 name: Build Ubuntu 22.04

Loading…
Cancel
Save