Skip to content

๐Ÿ› ัƒะฟั #4

๐Ÿ› ัƒะฟั

๐Ÿ› ัƒะฟั #4

name: Docker Image CI Test
on:
push:
branches: [ "test" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}:test
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Login
run: echo "${{ secrets.GH_TOKEN }}" | docker login ${{ env.REGISTRY }} --username cloud-native-everything --password-stdin
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Docker Push
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
deployment:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Deploy Stage
uses: fjogeleit/http-request-action@v1
with:
url: 'http://${{ vars.HOST }}/v1/update'
method: 'GET'
customHeaders: '{"Authorization": "Bearer ${{ secrets.WATCHTOWER_HTTP_API_TOKEN }}"}'
timeout: 120000