Skip to content

Update docker-image-beta.yml #128

Update docker-image-beta.yml

Update docker-image-beta.yml #128

name: Docker Image for Pushes
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: |
aunefyren/wrapperr
ghcr.io/${{ github.repository }}
tags: |
type-raw,value=beta
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_HUB_TOKEN }}
- name: Hash commit ID
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- name: test
run: echo $GITHUB_ENV
- name: Replace version variable
run: sed -i 's/{{RELEASE_TAG}}/beta-$GITHUB_ENV/g' files/config.go # Replace release variable with the name of this release
- name: Build and push
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}