-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
63 additions
and
45 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
name: Merge jobs | ||
name: Build on Push | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
# topic branches (e.g. fix/something) | ||
- '**/**' | ||
|
||
jobs: | ||
build_and_publish_container: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get branch name | ||
- uses: actions/checkout@v4 | ||
- name: Determine container name | ||
run: | | ||
export BRANCH="$(${{ github.ref }} | rev | cut -d '/' -f1 | rev ) | ||
- run: | ||
export SLUG="collectd/ci:${BRANCH}" | ||
branch="$(sed -e 's#refs/heads/##' <<<"${{ github.ref }}")" | ||
echo "SLUG=collectd/ci:${branch:?}" >>"${GITHUB_ENV}" | ||
- name: Build container | ||
run: | ||
docker build --pull -t "${SLUG}" . | ||
- run: docker inspect "${SLUG}" | ||
- run: docker history "${SLUG}" | ||
run: docker build --pull -t "${SLUG:?}" . | ||
- run: docker inspect "${SLUG:?}" | ||
- run: docker history "${SLUG:?}" | ||
- run: docker images | ||
- name: Log into the container registry | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- run: docker push "${SLUG}" | ||
- run: docker push "${SLUG:?}" |
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
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
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
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