Update Northstar to v1.27.4 #257
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: ci | |
on: | |
push: | |
paths: | |
- ".github/workflows/ci.yml" | |
- src/** | |
- scripts/mktag.sh | |
jobs: | |
server-docker: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
packages: write | |
outputs: | |
image: ${{steps.img.outputs.name}}@${{steps.build.outputs.digest}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- id: img | |
name: Generate image name | |
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated-dev" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "name=${name}" >> $GITHUB_OUTPUT | |
- id: tags | |
name: Generate tags | |
run: ./scripts/mktag.sh ${{steps.img.outputs.name}} dev-git | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- id: build | |
name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: src | |
push: true | |
tags: ${{steps.tags.outputs.tags}} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
labels: | | |
org.opencontainers.image.created=${{steps.tags.outputs.rfc3339}} | |
org.opencontainers.image.authors=discord:pg9182#8484 | |
org.opencontainers.image.url=https://github.com/${{github.repository}} | |
org.opencontainers.image.documentation=https://github.com/${{github.repository}} | |
org.opencontainers.image.source=https://github.com/${{github.repository}} | |
org.opencontainers.image.revision=${{github.sha}} | |
org.opencontainers.image.vendor=${{github.repository_owner}} | |
org.opencontainers.image.licenses=Zlib AND MIT | |
org.opencontainers.image.description=northstar-dedicated v${{steps.tags.outputs.ever}} @ ${{steps.tags.outputs.git}} (Titanfall v${{steps.tags.outputs.tfver}} / Northstar v${{steps.tags.outputs.nsver}}) | |
io.github.pg9182.northstar-dedicated.northstar.version=${{steps.tags.outputs.nsver}} | |
io.github.pg9182.northstar-dedicated.titanfall.version=${{steps.tags.outputs.tfver}} | |
io.github.pg9182.northstar-dedicated.entrypoint.compat=${{steps.tags.outputs.ever}} | |
io.github.pg9182.northstar-dedicated.entrypoint.version=${{github.sha}} | |
server-docker-release: | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/stable-') | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
packages: write | |
environment: | |
name: server-docker | |
url: https://${{needs.server-docker.outputs.image}} | |
concurrency: | |
group: server-docker-stable | |
cancel-in-progress: true | |
needs: | |
- server-docker | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- id: img | |
name: Generate image name | |
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "name=${name}" >> $GITHUB_OUTPUT | |
- id: tags | |
name: Generate tags | |
run: ./scripts/mktag.sh ${{steps.img.outputs.name}} stable-git stable | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Pull Docker image | |
run: docker pull ${{needs.server-docker.outputs.image}} | |
- name: Tag Docker image | |
run: for tag in $(echo "${{steps.tags.outputs.tags}}" | tr "," " "); do docker tag ${{needs.server-docker.outputs.image}} ${tag}; done | |
- name: Push Docker image | |
run: for tag in $(echo "${{steps.tags.outputs.tags}}" | tr "," " "); do docker push ${tag}; done |